ruby on rails - Pass block to registrations controller, devise_token_auth syntax? -


i have user , admin classes, have associated profile polymorphic has_one. i've found example vanilla devise build profile in new method user class, if try override method nothing happens.

in the devise token auth documentation says can pass block controller want extend , block run after controller performs standard function. example looks this:

class custom::registrationscontroller < devisetokenauth::registrationscontroller    def create     super |resource|       resource.do_something(extra)     end   end  end 

i need sorting out syntax of looks like. need call build_profile in create method, can't happen no matter put in block. if run outside block runs when registrations controller called (and can see controller getting called in logs.)

so, how call build_profile in block passed super, question.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

Delphi 7 and decode UTF-8 base64 -

html - Is there any way to exclude a single element from the style? (Bootstrap) -