Sha256: 4eef15a374983cde1687bd684cf64f5d65f0a06b71a688f637777cb2ce9cd695
Contents?: true
Size: 1.3 KB
Versions: 3
Compression:
Stored size: 1.3 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 = { 'Ne' => false, 'Ano' => true } 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 = {}) obj = self.instance_variable_get("@#{object_name}") html = InstanceTag.new(object_name, method, self, options.delete(:object)).to_text_area_tag(options) html << javascript_tag do %Q( $(function() { $('##{object_name}_#{method}').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
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
etabliocms_core-0.0.3 | lib/form_helper.rb |
etabliocms_core-0.0.2 | lib/form_helper.rb |
etabliocms_core-0.0.1 | lib/form_helper.rb |