Skip to content

Instantly share code, notes, and snippets.

@kirs
Created November 1, 2011 07:14
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kirs/1330080 to your computer and use it in GitHub Desktop.
Save kirs/1330080 to your computer and use it in GitHub Desktop.
Example User model for Inboxes gem
class User < ActiveRecord::Base
devise :database_authenticatable, :registerable,
:recoverable, :rememberable, :trackable, :validatable
attr_accessible :email, :password, :password_confirmation, :remember_me, :name
validates :name, :presence => true, :uniqueness => true
inboxes
end
@alexesDev
Copy link

Must be...

class User < ActiveRecord::Base
has_inboxes
end

@shanab
Copy link

shanab commented Sep 30, 2012

I think you should change inboxes method to be has_inboxes, since the documentation for inboxes refers to this gist.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment