Hello,
I have this controller :
class UserSessionsController < ApplicationController
skip_before_filter :require_login, :except => [:destroy]
def new
@user = User.new
end
def create
respond_to do |format|
if @user = login(params[:username],params[:password])
format.html { redirect_back_or_to(:users, :notice => 'login
successfull') }
format.xml { render :xml => @user, :status => :created, :location
=> @user }
else
format.html { flash.now[:alert] = "Login failed."; render :action
=> "new" }
format.xml { render :xml => @user.errors, :status =>
:unprocessable_entity }
end
end
end
def destroy
logout
redirect_to(:users, :notice => 'Logged out!')
end
end
What's the best way to change "login successfull" to "Welcome , <username>
where username is the name the user logs in.
Regards,
Roelof
--
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
To view this discussion on the web visit
https://groups.google.com/d/msg/rubyonrails-talk/-/V5Ca2VfYRw8J.
For more options, visit https://groups.google.com/groups/opt_out.