Module: Phlexi::Form::Options::Limit

Included in:
Builder
Defined in:
lib/phlexi/form/options/limit.rb

Instance Method Summary collapse

Instance Method Details

#limit(limit = nil) ⇒ Object



7
8
9
10
11
12
13
14
# File 'lib/phlexi/form/options/limit.rb', line 7

def limit(limit = nil)
  if limit.nil?
    options.fetch(:limit) { options[:limit] = calculate_limit }
  else
    options[:limit] = limit
    self
  end
end