Class: Tags::CroppableImage

Inherits:
Base
  • Object
show all
Defined in:
app/helpers/croppable/tag_helper.rb

Instance Method Summary collapse

Instance Method Details

#renderObject



20
21
22
23
24
25
26
27
28
29
30
# File 'app/helpers/croppable/tag_helper.rb', line 20

def render
  options = @options.stringify_keys

  add_default_name_and_id(options)

  options["input"] ||= dom_id(object, [options["id"], :croppable].compact.join("_")) if object

  html_tag = @template_object.croppable_field_tag(@object_name, @method_name, options.fetch("value") { value }, object, options.except("value"))

  error_wrapping(html_tag)
end