Sunday, December 1, 2013

Rails: scope in models

scope :my_books, lambda {|user_id| {:conditions => ["user_id = ?", user_id] }}

Have to read about scope and conditions - how to specify And , Or ?

No comments:

Post a Comment

Followers

Blog Archive