Module: StaticMatic::Helpers::FormHelper

Extended by:
FormHelper
Included in:
StaticMatic::Helpers, FormHelper
Defined in:
lib/staticmatic/helpers/form_helper.rb

Instance Method Summary (collapse)

Instance Method Details

- (Object) text_area(name, value, options = {})

Generate a form textarea



17
18
19
20
# File 'lib/staticmatic/helpers/form_helper.rb', line 17

def text_area(name, value, options = {})
  options.merge!(:name => name)
  tag(:textarea, options) { value }
end

- (Object) text_field(name, value, options = {})

Generates a form text field



9
10
11
12
# File 'lib/staticmatic/helpers/form_helper.rb', line 9

def text_field(name, value, options = {})
  options.merge!(:type => "text", :name => name, :value => value)
  tag(:input, options)
end