Skip to content

Instantly share code, notes, and snippets.

@maxinuss
Forked from cgallagher/milestone.rb
Created October 17, 2012 21:40
Show Gist options
  • Save maxinuss/3908437 to your computer and use it in GitHub Desktop.
Save maxinuss/3908437 to your computer and use it in GitHub Desktop.
Active Admin Image Upload Form
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