Hey all, if I do something like this in one of my controllers like users controller: if self.respond_to :hello and I have the hello method declared in application controller, which all my controllers inherit from: def hello end Then why does the interpreter say: uninitialized constant Mime::HELLO Thanks for response -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On Mar 25, 10:12 pm, dv <dviglion...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hey all, > > if I do something like this in one of my controllers like users > controller: > > if self.respond_to :hello > > and I have the hello method declared in application controller, which > all my controllers inherit from: > > def hello > end > > Then why does the interpreter say: > > uninitialized constant Mime::HELLO >Because the method for checking whether an instance responds to a method is respond_to? (respond_to is a rails thing to do with what format to use for a response) Fred> Thanks for response-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Possibly Parallel Threads
- AJAX GET requests returning "uninitialized constant Mime::RJS"
- Rails NameError : uninitialized constant RelationshipsController
- "uninitialized constant PostsController::Post"
- RJS not rendering correctly when mime-type is 'iphone'
- uninitialized constant UsersController::User