title: "undefined method" for a rails model
body: <p>I am using Devise with rails and i want to add a method "getAllComments", so i write this : </p>
  
  <pre><code>    class User &lt; ActiveRecord::Base
        # Include default devise modules. Others available are:
        # :token_authenticatable, :encryptable, :confirmable, :lockable, :timeoutable and :omniauthable
        devise :database_authenticatable, :registerable,
               :recoverable, :rememberable, :trackable, :validatable
  
        # Setup accessible (or protected) attributes for your model
        attr_accessible :email, :password, :password_confirmation, :remember_me, :city, :newsletter_register, :birthday, :postal_code,
            :address_complement, :address, :lastname, :firstname, :civility
  
        has_many :hotels_comments
  
        class &lt;&lt; self # Class methods
            def getAllComments
               true
            end
        end
      end
  </code></pre>
  
  <p>And in my controller : </p>
  
  <pre><code>def dashboard
    @user = current_user
    @comments = @user.getAllComments();
  end
  </code></pre>
  
  <p>And when i go to my url, i got </p>
  
  <pre><code> undefined method `getAllComments' for #&lt;User:0x00000008759718&gt;
  </code></pre>
  
  <p>What i am doing wrong?</p>
  
  <p>Thank you</p>