oggy / looksee

Supercharged method introspection in IRB
MIT License
364 stars 14 forks source link

can not use Looksee for action_mailer #34

Closed wendy0402 closed 9 years ago

wendy0402 commented 9 years ago

Hi, I tried to see all method of ActionMailer::Base using ls, but it give you error AbstractController::ActionNotFound: The action 'ls' could not be found for ActionMailer::Base. It is related with method_missing from ruby feature. it is the method_missing of ActionMailer::Base :

      def method_missing(method_name, *args) # :nodoc:
        if action_methods.include?(method_name.to_s)
          MessageDelivery.new(self, method_name, *args)
        else
          super
        end
      end

does looksee not support for class that using method_missing? :smile: thanks.

oggy commented 9 years ago

This works for me; both ActionMailer::Base.ls and ActionMailer::Base.allocate.ls.

What are you calling ls on? And what versions of ActionMailer, Looksee, and Ruby are you using?

If you're on the latest of everything then I'm guessing looksee isn't loaded. See if require 'looksee' changes anything.

wendy0402 commented 9 years ago

I'm using looksee (3.0.0), actionmailer (4.1.11), ruby 2.1.5. I'm calling ls on ActionMailer::Base (ActionMailer::Base) and has did require looksee.

oggy commented 9 years ago

Can you use looksee 3.1.0? ls is no longer implemented using method_missing, which I think will solve this.

wendy0402 commented 9 years ago

it works now, thanks @oggy !!