Class: ActiveMetadata::Attachment

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Paperclip, Paperclip::Glue
Defined in:
app/models/active_metadata/attachment.rb

Class Method Summary collapse

Class Method Details

.by_group(group, *args) ⇒ Object



25
26
27
28
29
# File 'app/models/active_metadata/attachment.rb', line 25

def by_group(group, *args)
  options = args.extract_options!
  order_by = options.delete(:order_by) || "created_at DESC"
  ActiveMetadata::Attachment.all(:conditions => options.merge(:group => group), :order => order_by)
end