gregbell/active_admin — Issue #651: set redirect_path after update
Author: fu-media
Created: 2011-10-20 12:33:47+00:00
State: open

i have a model which i need only for edit and update.

after the update it should be redirected to the user_page
ist there a way of a after_filter?

anyway, i tried this, but then i get a problem, due i cant call the edit action correctly. he always say "template is missing"

```ruby
ActiveAdmin.register Pokerscreenname do
menu false

actions :edit, :update

form do |f|
f.inputs do
f.input :name
end
f.buttons
end

controller do
def update
@pokerscreenname = Pokerscreenname.find params[:id]
@pokerscreenname.name = params[:pokerscreenname][:name]
if @pokerscreenname.valid? && @pokerscreenname.save
flash[:message] = "Screenname was updated successfully"
return redirect_to admin_user_path(Pokerscreenname.find(params[:id]).user.id)
else
render :action=>:edit
end
end
end
end

```

anyone know a solution?