ActiveAdmin:Extend

From FVue
Jump to: navigation, search

Problem

How does one extend controller actions in ActiveAdmin?

Solution

It's not recommended to use "super" in ActiveAdmin; e.g. when extending the "update" action, use "update!":

controller do
  def update
    update! do |format|
      format.html { redirect_to admin_cars_path }
    end
  end
end

See: https://stackoverflow.com/questions/9047848/rails-activeadmin-change-the-after-update-redirect-to

Comments

blog comments powered by Disqus