Firsthand Web Development, Ruby on Rails, Montréal
All things Ruby on Rails, Content Management Systems and Web Development
Showing posts with label
named scopes
.
Show all posts
Showing posts with label
named scopes
.
Show all posts
Saturday, September 11, 2010
How to get the options for a named_scope
›
class Video "score DESC, id" end Video.highest_scores.proxy_options # => {:order=>"score DESC, id"}
Sunday, December 6, 2009
Use Stubs and Expectations to Simplify Testing with Named Scopes
›
Summary: Use stubs to return the original class for a named scope, and use expectations to specify scope requirements to simplify testing Te...
Combining Named Scopes
›
This is a useful way to combine named scopes: # add to lib/named_scopes.rb for example class ActiveRecord::Base def self.named_scopes(na...
›
Home
View web version