Module: UtilityScopes::Limited::ClassMethods

Defined in:
lib/utility_scopes/limited.rb

Instance Method Summary collapse

Instance Method Details

#default_limit(default) ⇒ Object

Set the default limit to use for the limit scope



21
22
23
# File 'lib/utility_scopes/limited.rb', line 21

def default_limit(default)
  named_scope :limited, lambda { |*num| { :limit => num.flatten.first || default } }
end