Questions tagged [alias-method]

32 questions
0
votes
1 answer

Override same Class method in Ruby with Multiple Modules, with need to call super. Do I use Method Alias, or some other clever trick?

Here's the situation: I have a User model, and two modules for authentication: Oauth and Openid. Both of them override ActiveRecord#save, and have a fair share of implementation logic. Given that I can tell when the user is trying to login via…
Lance
  • 75,200
  • 93
  • 289
  • 503
-2
votes
1 answer

2 alias_method_chain -> stack level too deep

I have developed two plugins and they both modify the same method of the same class via alias_method_chain that result into stack level too deep error. first plugin: Rails.configuration.to_prepare do require 'issue_patch' Issue.send :include,…
freemanoid
  • 14,592
  • 6
  • 54
  • 77
1 2
3