Module: Lexxy::ActionTextTag
- Defined in:
- lib/lexxy/action_text_tag.rb
Instance Method Summary collapse
- #initialize(object_name, method_name, template_object, options = {}, &block) ⇒ Object
- #lexxy_render ⇒ Object
Instance Method Details
#initialize(object_name, method_name, template_object, options = {}, &block) ⇒ Object
3 4 5 6 7 |
# File 'lib/lexxy/action_text_tag.rb', line 3 def initialize(object_name, method_name, template_object, = {}, &block) super @block = block end |
#lexxy_render ⇒ Object
9 10 11 12 13 14 15 16 |
# File 'lib/lexxy/action_text_tag.rb', line 9 def lexxy_render = @options.stringify_keys add_default_name_and_id() ["input"] ||= @template_object.dom_id(object, [ ["id"], :trix_input ].compact.join("_")) if object html_tag = @template_object.lexxy_rich_textarea_tag(.delete("name"), .fetch("value") { value }, .except("value"), &@block) error_wrapping(html_tag) end |