Skip to content

Instantly share code, notes, and snippets.

@kivanio
Forked from Fosome/gist:9963512
Last active August 29, 2015 14:16
Show Gist options
  • Save kivanio/94531575c51a88c92be0 to your computer and use it in GitHub Desktop.
Save kivanio/94531575c51a88c92be0 to your computer and use it in GitHub Desktop.
ActiveAdmin.register AdvocacyPage do
menu label: 'Advocacy Page', url: "/admin/advocacy_pages/edit"
breadcrumb { [] }
permit_params :heading, :description
actions :update
controller do
def resource
AdvocacyPage.instance
end
def update
update! { edit_admin_advocacy_pages_url }
end
end
collection_action :edit, :method => :get do
end
form do |f|
f.inputs "Details" do
f.input :heading
f.input :description
end
f.actions do
f.action :submit
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment