summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
64ecd02)
persist to the next request and cause confusion.
if @user.save
if params[:user][:email] == @user.new_email
if @user.save
if params[:user][:email] == @user.new_email
- flash[:notice] = "User information updated successfully. Check your email for a note to confirm your new email address."
+ @notice = "User information updated successfully. Check your email for a note to confirm your new email address."
Notifier.deliver_email_confirm(@user, @user.tokens.create)
else
Notifier.deliver_email_confirm(@user, @user.tokens.create)
else
- flash[:notice] = "User information updated successfully."
+ @notice = "User information updated successfully."
- else
- flash.delete(:notice)
if user
token = user.tokens.create
Notifier.deliver_lost_password(user, token)
if user
token = user.tokens.create
Notifier.deliver_lost_password(user, token)
- flash[:notice] = "Sorry you lost it :-( but an email is on its way so you can reset it soon."
+ @notice = "Sorry you lost it :-( but an email is on its way so you can reset it soon."
- flash[:notice] = "Couldn't find that email address, sorry."
+ @notice = "Couldn't find that email address, sorry."
- else
- render :action => 'lost_password'
flash[:notice] = "Didn't find that token, check the URL maybe?"
end
end
flash[:notice] = "Didn't find that token, check the URL maybe?"
end
end
redirect_to :action => 'login'
end
redirect_to :action => 'login'
end
end
return
elsif User.authenticate(:username => email_or_display_name, :password => pass, :inactive => true)
end
return
elsif User.authenticate(:username => email_or_display_name, :password => pass, :inactive => true)
- flash[:notice] = "Sorry, your account is not active yet.<br>Please click on the link in the account confirmation email to activate your account."
+ @notice = "Sorry, your account is not active yet.<br>Please click on the link in the account confirmation email to activate your account."
- flash[:notice] = "Sorry, couldn't log in with those details."
+ @notice = "Sorry, couldn't log in with those details."
session[:user] = @user.id
redirect_to :action => 'account', :display_name => @user.display_name
else
session[:user] = @user.id
redirect_to :action => 'account', :display_name => @user.display_name
else
- flash[:notice] = 'Something went wrong confirming that user.'
+ @notice = 'Something went wrong confirming that user.'
session[:user] = @user.id
redirect_to :action => 'account', :display_name => @user.display_name
else
session[:user] = @user.id
redirect_to :action => 'account', :display_name => @user.display_name
else
- flash[:notice] = 'Something went wrong confirming that email address.'
+ @notice = 'Something went wrong confirming that email address.'
else
flash[:notice] = "You are already friends with #{name}."
end
else
flash[:notice] = "You are already friends with #{name}."
end
redirect_to :controller => 'user', :action => 'view'
end
end
redirect_to :controller => 'user', :action => 'view'
end
end
else
flash[:notice] = "#{friend.display_name} was not already one of your friends."
end
else
flash[:notice] = "#{friend.display_name} was not already one of your friends."
end
redirect_to :controller => 'user', :action => 'view'
end
end
redirect_to :controller => 'user', :action => 'view'
end
end
</head>
<body>
<div id="content">
</head>
<body>
<div id="content">
- <% if flash[:notice] %>
- <div id="notice"><%= flash[:notice] %></div>
+ <% if @notice || flash[:notice] %>
+ <div id="notice"><%= @notice || flash[:notice] %></div>