Class: PrettyFileInputInput
- Inherits:
-
SimpleForm::Inputs::Base
- Object
- SimpleForm::Inputs::Base
- PrettyFileInputInput
- Defined in:
- app/inputs/pretty_file_input_input.rb
Instance Method Summary collapse
- #input(wrapper_options) ⇒ Object
-
#tag_name ⇒ Object
Not sure why this is so goddamn hard to retrieve.
Instance Method Details
#input(wrapper_options) ⇒ Object
2 3 4 5 6 7 8 9 |
# File 'app/inputs/pretty_file_input_input.rb', line 2 def input() @builder.multipart = true PrettyFileInput::Views::Component.new( name: tag_name, persisted: object.try(:persisted?), filename: object.try(:send, attribute_name).try(:file).try(:filename) ).to_html end |
#tag_name ⇒ Object
Not sure why this is so goddamn hard to retrieve
12 13 14 15 |
# File 'app/inputs/pretty_file_input_input.rb', line 12 def tag_name ActionView::Helpers::Tags::Base.new(object_name, attribute_name, nil). send(:tag_name) end |