In Rails 3 I'm trying to call alias_method
from my before_filter
but I'm getting this error: NoMethodError in MyController#index
class ApplicationController < ActionController::Base
before_filter :my_test
protect_from_forgery
helper :all
def my_test
debugger
alias_method :new_method_name, :old_method_name
end
end
From the debugger:
(rdb:3) p self.methods.grep /old_method_name/
["old_method_name"]