Ruby on Rails Wednesday, May 18, 2016

Hey, there!

I'm pretty new to Rails so this may be a really stupid question but, I googled it and found just one specific reference (http://craftingruby.com/posts/2015/06/24/say-no-to_chained-scopes.html). In the application I'm working on there are some controller actions chaining scopes like this:

@results = @person.male.adult.left_handed

Is it normal? There are best practices on chaining scopes like: you can chain maximum 2 scopes?

Cheers!

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/9d56b1be-b588-4df2-8e8e-cdc3d22ba094%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment