class RansackSimpleForm::FormBuilder

Attributes

ransack_form_builder[R]

Public Class Methods

new(*args) click to toggle source
Calls superclass method
# File lib/ransack_simple_form.rb, line 26
def initialize(*args)
  super
  @ransack_form_builder = Ransack::Helpers::FormBuilder.new(*args)
end

Public Instance Methods

label(method, *args, &block) click to toggle source

delegate :label, to: :ransack_form_builder

Calls superclass method
# File lib/ransack_simple_form.rb, line 33
def label(method, *args, &block)
  options = args.extract_options!
  i18n = options[:i18n] || {}
  text = object.translate(
      method, i18n.reverse_merge(:include_associations => true)
  ) if object.respond_to? :translate
  text ||= args.first
  super(method, text, options, &block)
end