Created
June 13, 2012 10:28
-
-
Save cgallagher/2923297 to your computer and use it in GitHub Desktop.
Active Admin Image Upload Form
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ActiveAdmin.register Milestone do | |
scope :all, :default => true | |
scope :global | |
scope :user_specific | |
index do | |
column :title | |
column :description | |
column :required_litres | |
column :is_active | |
column :is_global | |
column :image | |
default_actions | |
end | |
form :html => { :enctype => "multipart/form-data" } do |f| | |
f.inputs 'Details' do | |
f.input :title | |
f.input :description, :as => :text | |
f.input :required_litres | |
f.input :is_active | |
f.input :is_global | |
end | |
f.inputs 'Images' do | |
f.input :image, :label => 'Milestone image' | |
end | |
f.buttons | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment