Alias keyword 'AS' treated case-sensitively
tkalliom opened this issue · 2 comments
tkalliom commented
By the SQL standard, keywords such as AS
are case-insensitive. However, rails_select_on_includes
seems to be case sensitive:
> User.includes(:comments).order("comments.updated_at").select("1 as testval").first.testval
=> 1
> User.includes(:comments).order("comments.updated_at").select("1 AS testval").first.testval
NoMethodError: undefined method `testval' for #<User:0x0055b293b6bb60>
alekseyl commented
Tomorrow I'll look for it. Thanks!
alekseyl commented
done in 0.1.3, thanks for noticing