Module: SecureEscrow::Railtie::ActionViewHelper

Defined in:
lib/secure_escrow/railtie.rb

Instance Method Summary collapse

Instance Method Details

#escrow_form_for(record, options = {}, &proc) ⇒ Object



18
19
20
21
22
23
24
25
26
27
28
# File 'lib/secure_escrow/railtie.rb', line 18

def escrow_form_for record, options = {}, &proc
  options[:html] ||= {}

  stringy_record = case record
  when String, Symbol then true
  else false
  end
  apply_form_for_options!(record, options) unless stringy_record

  form_for record, ActionViewHelperSupportMethods.escrow_options(controller, request, options, ActionViewHelperSupportMethods::POST), &proc
end

#escrow_form_tag(url_for_options = {}, options = {}, &block) ⇒ Object



30
31
32
# File 'lib/secure_escrow/railtie.rb', line 30

def escrow_form_tag url_for_options = {}, options = {}, &block
  form_tag url_for_options, ActionViewHelperSupportMethods.escrow_options(controller, request, options, ActionViewHelperSupportMethods::POST), &block
end