Sha256: 0922fbd9b8142331c0d098f85906e23f8b12ee3c2ad02fdaaa727337e1e9c088
Contents?: true
Size: 589 Bytes
Versions: 29
Compression:
Stored size: 589 Bytes
Contents
module Locomotive class SimpleImageInput < ImageInput def file_input @builder.file_field(attribute_name, input_html_options.merge(accept: 'image/*')) + @builder.hidden_field(:"remove_#{attribute_name}", class: 'remove', value: '0') + @builder.hidden_field(:"remote_#{attribute_name}_url", class: 'remote-url', value: '') end def browse_button_html <<-EOF <span class="file-browse">#{text(:browse)}</span> EOF end def file self.object.send(attribute_name.to_sym) end def file_url file.url end end end
Version data entries
29 entries across 29 versions & 1 rubygems