Module: Searchgasm::Helpers::Form::Base

Includes:
Shared
Defined in:
lib/searchgasm/helpers/form.rb

Overview

:nodoc:

Instance Method Summary collapse

Instance Method Details

#fields_for_with_searchgasm(*args, &block) ⇒ Object



142
143
144
145
146
147
148
149
150
151
152
# File 'lib/searchgasm/helpers/form.rb', line 142

def fields_for_with_searchgasm(*args, &block)
  search_object = find_searchgasm_object(args)
  if search_object
    searchgasm_options = extract_searchgasm_options!(args)
    new_args = searchgasm_args(args, search_object, searchgasm_options, :fields_for)
    insert_searchgasm_fields(new_args, search_object, searchgasm_options, &block)
    fields_for_without_searchgasm(*new_args, &block)
  else
    fields_for_without_searchgasm(*args, &block)
  end
end

#form_for_with_searchgasm(*args, &block) ⇒ Object



154
155
156
157
158
159
160
161
162
# File 'lib/searchgasm/helpers/form.rb', line 154

def form_for_with_searchgasm(*args, &block)
  search_object = find_searchgasm_object(args)
  if search_object
    searchgasm_options = extract_searchgasm_options!(args)
    form_for_without_searchgasm(*searchgasm_args(args, search_object, searchgasm_options, :form_for), &block)
  else
    form_for_without_searchgasm(*args, &block)
  end
end

#remote_form_for_with_searchgasm(*args, &block) ⇒ Object



164
165
166
167
168
169
170
171
172
# File 'lib/searchgasm/helpers/form.rb', line 164

def remote_form_for_with_searchgasm(*args, &block)
  search_object = find_searchgasm_object(args)
  if search_object
    searchgasm_options = extract_searchgasm_options!(args)
    remote_form_for_without_searchgasm(*searchgasm_args(args, search_object, searchgasm_options, :remote_form_for), &block)
  else
    remote_form_for_without_searchgasm(*args, &block)
  end
end