module Para::ActiveRecordOrderableMixin::ClassMethods
Public Instance Methods
acts_as_orderable(options = {})
click to toggle source
# File lib/para/orderable.rb, line 55 def acts_as_orderable(options = {}) return if orderable? unless ( ( options[:parent] && options[:as]) || (!options[:parent] && !options[:as]) ) raise "You need to either pass :parent and :as options to the " \ "acts_as_orderable macro, or no options at all." end self.orderable = true self._orderable_options = options include Para::Orderable end
orderable?()
click to toggle source
# File lib/para/orderable.rb, line 71 def orderable? !!orderable end