fix watch little bug
This commit is contained in:
parent
5c1926f186
commit
d34df19a7a
|
@ -42,7 +42,7 @@ class AccountController < ApplicationController
|
|||
redirect_to home_url
|
||||
elsif request.post?
|
||||
logout_user
|
||||
redirect_to signin_path
|
||||
redirect_to home_url
|
||||
end
|
||||
# display the logout form
|
||||
end
|
||||
|
@ -282,7 +282,7 @@ class AccountController < ApplicationController
|
|||
def register_by_email_activation(user, &block)
|
||||
token = Token.new(:user => user, :action => "register")
|
||||
if user.save and token.save
|
||||
UserStatus.create(:user_id => user.id)
|
||||
UserStatus.create(:user_id => user.id, :changsets_count => 0, :watchers_count => 0)
|
||||
Mailer.register(token).deliver
|
||||
flash[:notice] = l(:notice_account_register_done)
|
||||
redirect_to signin_path
|
||||
|
@ -299,7 +299,7 @@ class AccountController < ApplicationController
|
|||
user.activate
|
||||
user.last_login_on = Time.now
|
||||
if user.save
|
||||
UserStatus.create(:user_id => user.id)
|
||||
UserStatus.create(:user_id => user.id, :changsets_count => 0, :watchers_count => 0)
|
||||
self.logged_user = user
|
||||
flash[:notice] = l(:notice_account_activated)
|
||||
redirect_to my_account_path
|
||||
|
@ -313,7 +313,7 @@ class AccountController < ApplicationController
|
|||
# Pass a block for behavior when a user fails to save
|
||||
def register_manually_by_administrator(user, &block)
|
||||
if user.save
|
||||
UserStatus.create(:user_id => user.id)
|
||||
UserStatus.create(:user_id => user.id ,:changsets_count => 0, :watchers_count => 0)
|
||||
# Sends an email to the administrators
|
||||
Mailer.account_activation_request(user).deliver
|
||||
account_pending
|
||||
|
|
Loading…
Reference in New Issue