On Monday, December 10, 2012 4:08:06 PM UTC-5, Rodrigo Rosenfeld Rosas
wrote:
> What if a column is named "class"? I'd rather prefer something like that:
>
> Post.where { |post|
> post[:title].like('zomg%') | post[:class].like('bbq%')
> }
>
>
In Squeel's specific case, the DSL object is a blankslate, so it works
fine. Hash-style syntax would be another option. That would avoid
method_missing overhead for simple column access, which would be a good
thing, but make things less readable, as well. Not my personally-preferred
tradeoff, but certainly could see a case for it.
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Core" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-core/-/Als2_nNq-08J.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en.