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
- #input_select_tag(name, choices, container_options = {}, select_options = {}) ⇒ Object
- #input_text(name, value = nil, options = {}) ⇒ Object
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, ={}, ={}) [:class] = "input-select-container #{[:class]}".strip content_tag :div, do [:class] = "input input-select #{[:class]}".strip choices = (choices) if choices.is_a? Array select_tag name, choices, 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, ={}) [:class] = "input input-text #{[:class]}".strip text_field_tag name, value, end |