Class: SimpleFormFancyUploads::ImagePreviewInput
- Inherits:
-
SimpleForm::Inputs::FileInput
- Object
- SimpleForm::Inputs::FileInput
- SimpleFormFancyUploads::ImagePreviewInput
- Defined in:
- lib/simple_form_fancy_uploads/image_preview_input.rb
Instance Method Summary collapse
Instance Method Details
#input(wrapper_options = nil) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/simple_form_fancy_uploads/image_preview_input.rb', line 3 def input(=nil) = (, ) url = preview_url() out = '' out << template.image_tag(url) if url out << @builder.input("#{attribute_name}_cache", as: 'hidden') (out << super).html_safe end |