ruby - alias_method chain issue in application controller -


I'm using magic for login, am I overwriting log-in thieves in my application controller? Method using the alias_method series as follows.

  alias_method_chain: logged_in ?, magic protection: def logged_in? Sorcery_logged_in? & Amp; & Amp; (Current_user.customer ?? Current_user.activated?) End   

Finally ends with "Undefined method sorcery_logged_in?"

You are using alias_method_chain , me It seems that you will try:

  alias_method_chain: logged_in ?,: sourcery   

and then logged_in_without_sourcery? and Use the methods of logged_in_with_sourcery? .

Check the docs.

Comments

Popular posts from this blog

ios - Adding an SKSpriteNode to SKScene from a child SKSpriteNode -

Matlab transpose a table vector -

c# - Textbox not clickable but editable -