Walter Davis wrote in post #1182112:
>>>>
> Part of one of the RailsConf sessions I went to, either last year or the
> year before, could have been re-titled "default_scope considered
> harmful". I don't think it's deprecated or anything, but it is
> definitely something to use sparingly, and with a lot of forethought
> about what other scopes you may need later. Better to chain scopes, so
> you call ControllerName.your_scope.latest, rather than adding the
> "latest" behavior into your default scope. It makes it more declarative.
> More (duplicated) characters is not really the issue you want to
> prioritize. Being able to reason about your code in the current bit you
> are working on is.
>
> Walter

Very true. Thank you for your advice.

-- 
Posted via http://www.ruby-forum.com/.

-- 
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+unsubscr...@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/48d8c3d226a1b8b028ecf82c4ea7c154%40ruby-forum.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to