Class: ActionView::Helpers::FormBuilder
- Inherits:
-
Object
- Object
- ActionView::Helpers::FormBuilder
- Defined in:
- lib/prime/rails/form_helper.rb
Instance Method Summary collapse
- #p_button(value = nil, options = {}, &block) ⇒ Object
- #p_check_box(method, options = {}, checked_value = "1", unchecked_value = "0") ⇒ Object
- #p_select(method, choices, options = {}, html_options = {}) ⇒ Object
Instance Method Details
#p_button(value = nil, options = {}, &block) ⇒ Object
50 51 52 53 54 |
# File 'lib/prime/rails/form_helper.rb', line 50 def (value = nil, = {}, &block) value, = nil, value if value.is_a?(Hash) value ||= submit_default_value @template.(value, , &block) end |
#p_check_box(method, options = {}, checked_value = "1", unchecked_value = "0") ⇒ Object
56 57 58 |
# File 'lib/prime/rails/form_helper.rb', line 56 def p_check_box(method, = {}, checked_value = "1", unchecked_value = "0") @template.p_check_box(@object_name, method, (), checked_value, unchecked_value) end |
#p_select(method, choices, options = {}, html_options = {}) ⇒ Object
60 61 62 |
# File 'lib/prime/rails/form_helper.rb', line 60 def p_select(method, choices, = {}, = {}) @template.p_select(@object_name, method, choices, (), @default_options.merge()) end |