Sha256: 7dae1259a7b1059c6f972237ca24b4d3f485886c20cff95ea52e2daecf4f43e1
Contents?: true
Size: 610 Bytes
Versions: 71
Compression:
Stored size: 610 Bytes
Contents
# This allows the app to call f.input :something, :as => :asset_box # in either Formtastic or SimpleForm, but not both at the same time if defined?(SimpleForm) class AssetBoxInput < SimpleForm::Inputs::FileInput def input(wrapper_options = nil) Inputs::AssetBox.new(object, object_name, template, attribute_name, options).to_html end end elsif defined?(Formtastic) class AssetBoxInput < Formtastic::Inputs::FileInput def to_html input_wrapping do label_html << Inputs::AssetBox.new(@object, @object_name, @template, @method, @options).to_html end end end end
Version data entries
71 entries across 71 versions & 1 rubygems