0

I don't know the syntax of it.

update! do {
     success: admin_user_path
   }

Is this the right syntax? Im using Active Admin

abhim
  • 1,126
  • 1
  • 9
  • 19

1 Answers1

3

You can find the details on handing success/failures on the Inherited Resources readme. ActiveAdmin uses Inherited Resources for all of its controller actions.

class ProjectsController < InheritedResources::Base
  def update
    update! do |success, failure|
      success.html { redirect_to project_url(@project) }
      failure.html { redirect_to root_url }
    end
  end
end
Charles Maresh
  • 3,323
  • 22
  • 29