Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
add title_like scope
  • Loading branch information
amatsuda committed Feb 28, 2010
1 parent 13f1ca7 commit 105c5e6
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions app/models/book.rb
@@ -1,2 +1,3 @@
class Book < ActiveRecord::Base
scope :title_like, lambda {|t| where 'title like ?', "%#{t}%"}
end

0 comments on commit 105c5e6

Please sign in to comment.