Module: Library::TaggedAsset
- Defined in:
- lib/library/tagged_asset.rb
Defined Under Namespace
Modules: ClassMethods, InstanceMethods
Class Method Summary collapse
Class Method Details
.included(base) ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# File 'lib/library/tagged_asset.rb', line 4 def self.included(base) base.class_eval { named_scope :furniture, {:conditions => 'assets.furniture = 1'} named_scope :not_furniture, {:conditions => 'assets.furniture = 0 or assets.furniture is null'} named_scope :newest_first, { :order => 'created_at DESC'} do def paged (={}) paginate({:per_page => 20, :page => 1}.merge()) end end extend TaggablePage::ClassMethods include TaggablePage::InstanceMethods } end |