ruby on rails - Triggering a controller action after new/create -


rails 3.2.18 ruby 2.1.5 

in controller, have new , create methods. have method in controller, let's call post_create automatically trigger after create method finishes executing. method has no view associated it, , it's supposed update table.

i tried doing

after_filter :post_create, only:[:create] 

but need parameters passed create method, , @ point no longer have them. ideas?

it can done in way:-

def create  #code  redirect_to post_create_path(parameter) end  def post_create   #update table   redirect_to desired_path end 

note:- set path knowing routes typing in console rake routes.


Comments