Class: OgoneRails::Form
- Inherits:
-
Object
- Object
- OgoneRails::Form
- Defined in:
- lib/ogone-rails/helpers.rb
Instance Method Summary collapse
- #add_input(name, value) ⇒ Object
- #get_form ⇒ Object
-
#initialize(action) ⇒ Form
constructor
A new instance of Form.
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_form ⇒ Object
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 |