Frederick Cheung wrote: > Like I said you can't call an instance method without an instance. > It's like trying to say ActiveRecord::Base.reload - it doesn't make > any sense - you can only call that on an instance. > > Fred
Ok, so would it be like: self.method() or obj=MailSending.new() and then obj.method()? Also in the book I'm reading at the moment says that to use "before filter" to intercept to the actions in the controller we have to put the particular method in ApplicationController(the parent class of all our controllers) and that we have to restrict it as any public methods here are exposed to end users as actions and hence asks to make it private: ================================================================================ class ApplicationController < ActionController::Base private def authorize ......... end end ================================================================================ and in the corresponding controllers call it with: ================================================================================ class SomeController < ApplicationController before_filter :authorize end ================================================================================ Problems: Though I have called the method accordingly in the corresponding controllers, as soon as I make the authorize method private a warning icon appears at the side as "unused private method authorize" and underlines all the words with curly yellow lines (by the way I'm using aptana studio). But, however, everything seems to work fine. So, how can I get rid of those warning and ugly underlines. Thanks.. -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

