Sha256: 39ae923e4cf390a735f2f23852c924829bb50d6063131fef0d01b1af0a2db06f
Contents?: true
Size: 1.27 KB
Versions: 9
Compression:
Stored size: 1.27 KB
Contents
module ActionView module Helpers module FormOptionsHelper DEFAULT_TEXTAREA_WIDTH = 550 DEFAULT_TEXTAREA_HEIGHT = 200 def boolean_yes_no_select(object_name, method, options = {}, html_options = {}) choices = [ ['Ano', true], ['Ne', false], ] InstanceTag.new(object_name, method, self, options.delete(:object)).to_select_tag(choices, options, html_options) end def textile_text_area(object_name, method, options = {}) html = InstanceTag.new(object_name, method, self, options.delete(:object)).to_text_area_tag(options) id = options[:id] || "#{object_name}_#{method}" html << javascript_tag do %Q( $(function() { $('##{id}').markItUp(mySettings); }); ) end html end end class FormBuilder def boolean_yes_no_select(method, options = {}, html_options = {}) @template.boolean_yes_no_select(@object_name, method, objectify_options(options), @default_options.merge(html_options)) end def textile_text_area(method, options = {}, html_options = {}) @template.textile_text_area(@object_name, method, objectify_options(options)) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems