Class: OgoneRails::Form

Inherits:
Object
  • Object
show all
Defined in:
lib/ogone-rails/helpers.rb

Instance Method Summary collapse

Constructor Details

#initialize(action) ⇒ Form

Returns a new instance of Form.



159
160
161
162
# File 'lib/ogone-rails/helpers.rb', line 159

def initialize action
  @form = ""
  @form << "<form method='post' action='#{action}'>\n"
end

Instance Method Details

#add_input(name, value) ⇒ Object



164
165
166
# File 'lib/ogone-rails/helpers.rb', line 164

def add_input name, value
  @form << "\t<input type='hidden' name='#{name}' value='#{value}'>\n"
end

#get_formObject



169
170
171
172
173
# File 'lib/ogone-rails/helpers.rb', line 169

def get_form
  @form << "\t<input type='submit' value='ga verder naar ogones' id='submit2' name='submit2'>\n"
  @form << "</form>"
  @form.html_safe
end