docs/8-custom-actions.md in activeadmin-0.5.0 vs docs/8-custom-actions.md in activeadmin-0.5.1
- old
+ new
@@ -15,11 +15,11 @@
ActiveAdmin.register Post do
collection_action :import_csv, :method => :post do
# Do some CSV importing work here...
- redirect_to {:action => :index}, :notice => "CSV imported successfully!"
+ redirect_to {:action => :index}, {:notice => "CSV imported successfully!"}
end
end
This collection action will generate a route at "/admin/posts/import_csv"
@@ -35,10 +35,10 @@
ActiveAdmin.register User do
member_action :lock, :method => :put do
user = User.find(params[:id])
user.lock!
- redirect_to {:action => :show}, :notice => "Locked!"
+ redirect_to {:action => :show}, {:notice => "Locked!"}
end
end
This will generate a route at "/admin/users/:id/lock" pointing to the