Module: ActionView::Helpers::FormOptionsHelper
- Defined in:
- lib/form_helper.rb
Constant Summary collapse
- DEFAULT_TEXTAREA_WIDTH =
550
- DEFAULT_TEXTAREA_HEIGHT =
200
Instance Method Summary collapse
- #boolean_yes_no_select(object_name, method, options = {}, html_options = {}) ⇒ Object
- #textile_text_area(object_name, method, options = {}) ⇒ Object
Instance Method Details
#boolean_yes_no_select(object_name, method, options = {}, html_options = {}) ⇒ Object
8 9 10 11 12 13 14 |
# File 'lib/form_helper.rb', line 8 def boolean_yes_no_select(object_name, method, = {}, = {}) choices = [ ['Ano', true], ['Ne', false], ] InstanceTag.new(object_name, method, self, .delete(:object)).to_select_tag(choices, , ) end |
#textile_text_area(object_name, method, options = {}) ⇒ Object
16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'lib/form_helper.rb', line 16 def textile_text_area(object_name, method, = {}) html = InstanceTag.new(object_name, method, self, .delete(:object)).to_text_area_tag() id = [:id] || "#{object_name}_#{method}" html << javascript_tag do %Q( $(function() { $('##{id}').markItUp(mySettings); }); ) end html end |