-
-
Save kivanio/94531575c51a88c92be0 to your computer and use it in GitHub Desktop.
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 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