Ryan B. wrote:
Actually the best place to ask is right here.
Could you show us the code you’re using in your create action Ruchita?
On Dec 27, 2007 4:14 PM, Ruchita S.
Actually I am implementing a registration form. In that I have applied a
Posted via http://www.ruby-forum.com/.
Feel free to add me to MSN and/or GTalk as this email.
The code for signup is:
@rightpanels = Rightpanel.find(:all, :limit => 2, :order => ‘rand()’)
@countries = Country.find :all
@user = User.new
@user = User.new(params[:user])
flash[:notice] = ‘You will recieve a mail on your account with login
info and link, once the admin activates your account’
redirect_to :controller => ‘store’, :action => ‘login’
flash[:notice] = ‘This Login already Exist.Try Again!’
render :action => ‘sign_up’ , :layout => true, :id => @user.id
redirect_to :action => ‘sign_up’, :controller => ‘store’
User model is:
validates_uniqueness_of :login, :message => “username already exists”
This is the code of controller and model.