Module: Shipyard::FormHelper

Includes:
ActionView::Context, ActionView::Helpers::FormOptionsHelper, ActionView::Helpers::FormTagHelper
Defined in:
lib/shipyard-framework/helpers/form_helper.rb

Instance Method Summary collapse

Instance Method Details

#input_select_tag(name, choices, container_options = {}, select_options = {}) ⇒ Object



12
13
14
15
16
17
18
19
# File 'lib/shipyard-framework/helpers/form_helper.rb', line 12

def input_select_tag(name, choices, container_options={}, select_options={})
  container_options[:class] = "input-select-container #{container_options[:class]}".strip
   :div, container_options do
    select_options[:class] = "input input-select #{select_options[:class]}".strip
    choices = options_for_select(choices) if choices.is_a? Array
    select_tag name, choices, select_options
  end
end

#input_text(name, value = nil, options = {}) ⇒ Object



7
8
9
10
# File 'lib/shipyard-framework/helpers/form_helper.rb', line 7

def input_text(name, value=nil, options={})
  options[:class] = "input input-text #{options[:class]}".strip
  text_field_tag name, value, options
end