Sha256: 2add445e0b3840aaa5813f5b047458ed5a6cbd6f1cbb967fc27c465b64e5f361
Contents?: true
Size: 462 Bytes
Versions: 1
Compression:
Stored size: 462 Bytes
Contents
class PrettyFileInputInput < SimpleForm::Inputs::Base def input @builder.multipart = true PrettyFileInput::Component.new( name: tag_name, persisted: object.persisted?, filename: object.try(:send, attribute_name).try(:file).try(:filename) ).to_html end # Not sure why this is so goddamn hard to retrieve def tag_name ActionView::Helpers::Tags::Base.new(object_name, attribute_name, nil). send(:tag_name) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pretty_file_input-0.0.1 | app/inputs/pretty_file_input_input.rb |