Skip to content

Commit

Permalink
Corrected session bug
Browse files Browse the repository at this point in the history
  • Loading branch information
okeen committed Sep 2, 2011
1 parent a2c0d92 commit 2b11af1
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions app/models/player.rb
Expand Up @@ -9,9 +9,10 @@ class Player < ActiveRecord::Base
include Statable

devise :database_authenticatable, :omniauthable, :rememberable
before_create :init_devise_password,:create_welcome_notification
before_create :init_devise_password
before_create :geocode_with_gmaps
before_update :geocode_with_gmaps
after_create :create_welcome_notification

geocoded_by :full_address

Expand Down Expand Up @@ -80,9 +81,9 @@ def init_devise_password
password = Devise.friendly_token[0,20]
end

def create_welcome_notifications
def create_welcome_notification
notification= NotificationType.NEW_PLAYER
notification[:params][:name] = self.name
@player.notifications.create notification
notifications.create notification
end
end

0 comments on commit 2b11af1

Please sign in to comment.