I've been discussed the possibility of exposing ARel power with the core team too, and found out that they thing ARel API is not mature enough to be exposed. Maybe we should wait :)
In another hand, they don't like the extending hash for this apparent reason so I'm pretty sure you won't see it in the future release unless you can convince them that it's more elegant. Using that metawhere gem is you way to go :) Prem On 13 ?.?. 2554, at 14:49, Jan wrote: > That's awesome, thanks :) > > Now I just wonder why it's not in rails by default? > > On Sun, Feb 13, 2011 at 3:42 PM, Ryan Bigg <[email protected]> wrote: > Check out the meta_where gem: https://github.com/ernie/meta_where > > > > On 13/02/2011, at 18:16, Jan <[email protected]> wrote: > >> Hello, >> >> I just learned that Arel support more powerful queries than in rails, e.g. >> >> users = Arel::Table.new('users') >> users.where( (users[:id].eq(1)).or(users[:id].eq(2)) ) >> >> In rails it will be >> >> User.where( (User.arel_table[:id].eq(1)).or(User.arel_table[:id].eq(2))) ) >> >> Which is too complex. DAE think it's a good to have a convinient way to >> express above query in rails? maybe like this: >> >> User.where(:id.eq(1).or.(:id.eq(2))) >> or >> User.where(:id => 1).or.where(:id => 2) >> ? >> >> Or such a way already exists? If no, why not? >> >> Regards >> Jan >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Ruby on Rails: Core" group. >> 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. > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > 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. > > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Core" group. > 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. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Core" group. 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.
