Class: Photo
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Photo
- Defined in:
- app/models/photo.rb
Class Method Summary collapse
Class Method Details
.page(search, page) ⇒ Object
6 7 8 |
# File 'app/models/photo.rb', line 6 def self.page(search, page) (:manage).search(search).order("title").paginate(:per_page => 20, :page => page) end |
.search(search) ⇒ Object
10 11 12 13 14 15 16 |
# File 'app/models/photo.rb', line 10 def self.search(search) if search where("title LIKE ?", "%#{search}%") else scoped end end |