Created
June 18, 2014 15:48
-
-
Save cdesch/0af7811ba9247c47ac58 to your computer and use it in GitHub Desktop.
This file contains hidden or 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 Event do | |
index do | |
column :title | |
column :short_description | |
column :event_date | |
column :published | |
column :type | |
column :category | |
default_actions | |
end | |
form do |f| | |
#Debugging | |
f.semantic_errors *f.object.errors.keys | |
f.inputs "Details" do | |
f.input :title, :required => true | |
f.input :short_description true | |
f.input :description, as: :wysihtml5 | |
f.input :event_date | |
f.input :type, :required => true | |
f.input :category, :required => true | |
f.input :published, :label => "Published" | |
f.input :image | |
f.input :remote_image_url | |
f.input :recurring_time, | |
f.input :recurring_rule, :as=> :select, :input_html => { :class => 'recurring_select'}, :collection => options_for_select([[ "- not recurring -" , "null"],["Set schedule..." , "custom" ]], [ "- not recurring -" , "null"]) | |
end | |
f.actions | |
end | |
controller do | |
def permitted_params | |
params.permit event: [:title,:image, :remote_image_url, :description, :short_description, :published, :event_date, :recurring_rule, :type_id, :category_id, :recurring_time ] | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment