0

I have an alias method as:

alias :is_animal , :is_animal?

I am trying to declare an alias method chain for the above methods:

alias_method_chain :is_animal, :with_fourlegs

alias_method_chain :is_animal?, :with_fourlegs

Is there any better way that I can use alias for alias method chain?

P.S: I rather not like to declare alias method chain twice for the same alias method.

Kostas Rousis
  • 5,918
  • 1
  • 33
  • 38
ramya
  • 275
  • 1
  • 5
  • 13
  • Can you give me the Example so what you wanna create!!! – RubyOnRails Nov 19 '14 at 07:38
  • I am here bound to define alias_method_chain for 2 times... One with "is_animal" and one with "is_animal?" Instead is there any way that I can give alias to alias_method_chain something like alias_method_chain :is_animal, :with_fourlegs alias :is_animal is_animal? I wouldnt like to declare alias method chain twice. – ramya Nov 19 '14 at 10:57

0 Answers0