Can someone help me complete this piece of code?

I'm thinking about using :unless because the only place where I wouldn't 
like the password validation is in the Edit User page.

validates :password,
:presence => true,
:length => { :minimum => 6, :maximum => 20, :message => 'should have
between 6 to 12 characters' },
:confirmation => true,
:unless => ????????????

I tried...
:unless => params[:controller] == 'users' and params[:action] == 'edit'

but I got the following error...
Routing Error
undefined local variable or method `params' for #<Class:0x7f92ca83a518>

-- 
Posted via http://www.ruby-forum.com/.

-- 
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 rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to