Commit b6806742
Changed files (1)
app
models
app/models/user.rb
@@ -12,12 +12,13 @@ class User < ActiveRecord::Base
validates :name, :presence => true
validates :website, :format => URI::regexp(%w(http https)), :allow_blank => true
#validates_with UrlValidation
- has_many :authentications
- has_and_belongs_to_many :interests, :join_table => 'users_interests', :uniq => true, :autosave => true
devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable
- attr_accessible :name, :email, :website, :twitter, :facebook, :city, :latitude, :longitude, :password, :password_confirmation, :remember_me
+ attr_accessor :password, :password_confirmation, :current_password
+ attr_accessible :name, :email, :website, :twitter, :facebook, :city, :latitude, :longitude, :password, :password_confirmation, :current_password, :remember_me, :interest_ids
has_many :creations, :dependent => :destroy
has_many :favorites, :dependent => :destroy
+ has_many :authentications
+ has_and_belongs_to_many :interests, :join_table => 'users_interests', :uniq => true, :autosave => true
def add_favorite( creation )
if self.already_likes(creation)