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

Version Path
effective_assets-1.11.2 app/models/inputs/asset_box_input.rb
effective_assets-1.11.1 app/models/inputs/asset_box_input.rb
effective_assets-1.11.0 app/models/inputs/asset_box_input.rb
effective_assets-1.10.1 app/models/inputs/asset_box_input.rb
effective_assets-1.10.0 app/models/inputs/asset_box_input.rb
effective_assets-1.9.14 app/models/inputs/asset_box_input.rb
effective_assets-1.9.13 app/models/inputs/asset_box_input.rb
effective_assets-1.9.12 app/models/inputs/asset_box_input.rb
effective_assets-1.9.11 app/models/inputs/asset_box_input.rb
effective_assets-1.9.10 app/models/inputs/asset_box_input.rb
effective_assets-1.9.9 app/models/inputs/asset_box_input.rb
effective_assets-1.9.8 app/models/inputs/asset_box_input.rb
effective_assets-1.9.7 app/models/inputs/asset_box_input.rb
effective_assets-1.9.6 app/models/inputs/asset_box_input.rb
effective_assets-1.9.5 app/models/inputs/asset_box_input.rb
effective_assets-1.9.4 app/models/inputs/asset_box_input.rb
effective_assets-1.9.3 app/models/inputs/asset_box_input.rb
effective_assets-1.9.2 app/models/inputs/asset_box_input.rb
effective_assets-1.9.1 app/models/inputs/asset_box_input.rb
effective_assets-1.9.0 app/models/inputs/asset_box_input.rb