Class: ActiveMetadata::Note

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/active_metadata/note.rb

Class Method Summary collapse

Class Method Details

.by_group(group, *args) ⇒ Object



7
8
9
10
11
# File 'app/models/active_metadata/note.rb', line 7

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