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



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

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



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

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



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

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