Commit 5e4b9aaa

mo k <m@mokhan.ca>
2012-01-07 03:38:30
remove omniauth related stuff from User.
1 parent 0eabc3a
Changed files (2)
app
models
views
creations
app/models/user.rb
@@ -1,23 +1,8 @@
 class User < ActiveRecord::Base
   validates :name,  :presence => true
   has_many :authentications
-  # 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 :name, :email, :password, :password_confirmation, :remember_me
-
   has_many :creations, :dependent => :destroy
   has_many :likes, :dependent => :destroy
-
-  def apply_omniauth(omniauth)
-    puts omniauth
-    self.email = omniauth['user_info']['email'] if email.blank?
-    authentications.build(:provider => omniauth['provider'], :uid => omniauth['uid'])
-  end
-  
-  def password_required?
-    (authentications.empty? || !password.blank?) && super
-  end
 end
app/views/creations/show.html.erb
@@ -71,4 +71,3 @@
     <a href="<%= url_for profile_path @creation.user %>"><img src="<%= avatar_url @creation.user %>&amp;s=200" alt="<%= @creation.user.name %>" /></a>
   </div>
 </div>
-