Sha256: dac5d65b9ed27b3e1b00c1db1691d2f7e36731a078df60402133d5f2b7262f72
Contents?: true
Size: 719 Bytes
Versions: 2
Compression:
Stored size: 719 Bytes
Contents
module ActiveScaffold module Helpers module FormColumnHelpers def active_scaffold_input_paperclip(column, options) input = file_field(:record, column.name, options) paperclip = @record.send("#{column.name}") if paperclip.file? content = active_scaffold_column_paperclip(column, @record) content_tag(:div, content + " | " + link_to_function(as_(:remove_file), "$(this).next().value='true'; $(this).up().hide().next().show()") + hidden_field(:record, "delete_#{column.name}", :value => "false") ) + content_tag(:div, input, :style => "display: none") else input end end end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
brisk-bills-0.8.2 | vendor/plugins/active_scaffold/lib/bridges/paperclip/lib/form_ui.rb |
brisk-bills-0.8.1 | vendor/plugins/active_scaffold/lib/bridges/paperclip/lib/form_ui.rb |