Sha256: fffb28e6ad16a9886d9dc13e870dfce53868463be50a43bc0db1523566cb7c7b
Contents?: true
Size: 492 Bytes
Versions: 1
Compression:
Stored size: 492 Bytes
Contents
class PrettyFileInputInput < SimpleForm::Inputs::Base def input(wrapper_options) @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 # 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.1.0 | app/inputs/pretty_file_input_input.rb |