[Rails] Re: Allow blank on should validate_uniqueness_of

2010-06-17 Thread pepe
On Jun 17, 1:28 am, J. Pablo Fernández pup...@pupeno.com wrote: Where do you pass that? should validate_uniqueness_of(:email, :allow_blank = true) That doesn't work. That method takes only one argument: group/rubyonrails-talk?hl=en. -- J. Pablo Fernández pup...@pupeno.com

Re: [Rails] Re: Allow blank on should validate_uniqueness_of

2010-06-17 Thread J . Pablo Fernández
pepe, I'm not asking how to do the validation, I'm asking how to test the validation with shoulda using the new syntax, I already have this line in the model: validate_uniqueness_of :email, :allow_blank = true in my tests I have: should validate_uniqueness_of(:email) should being a shoulda

Re: [Rails] Re: Allow blank on should validate_uniqueness_of

2010-06-17 Thread Colin Law
On 17 June 2010 09:18, pepe p...@betterrpg.com wrote: On Jun 17, 1:28 am, J. Pablo Fernández pup...@pupeno.com wrote: Where do you pass that? should validate_uniqueness_of(:email, :allow_blank = true) That doesn't work. That method takes only one argument: group/rubyonrails-talk?hl=en. --

[Rails] Re: Allow blank on should validate_uniqueness_of

2010-06-17 Thread J . Pablo Fernández
No, allowing blank is fine, the validation is this: validate_uniqueness_of(:email, :allow_blank = true) The issue is writing the test. On Jun 17, 10:47 am, Colin Law clan...@googlemail.com wrote: On 17 June 2010 09:18, pepe p...@betterrpg.com wrote: On Jun 17, 1:28 am, J. Pablo

Re: [Rails] Re: Allow blank on should validate_uniqueness_of

2010-06-16 Thread J . Pablo Fernández
Where do you pass that? should validate_uniqueness_of(:email, :allow_blank = true) That doesn't work. That method takes only one argument: /Users/pupeno/.rvm/gems/ruby-1.8.7-p...@lemonfrog/gems/shoulda-2.11.0/lib/shoulda/context.rb:429:in `validate_uniqueness_of': wrong number of arguments (2

[Rails] Re: Allow blank on should validate_uniqueness_of

2010-06-15 Thread chewmanfoo
:allow_blank = true On Jun 15, 3:26 pm, J. Pablo Fernández pup...@pupeno.com wrote: Hello, Using shoulda, any ideas how to allow blank when having this test: should validate_uniqueness_of(:email) Thanks. -- J. Pablo Fernández pup...@pupeno.com (http://pupeno.com) -- You received this