validates_presence_of checks the attribute according to Object.blank?
"An object is blank if it‘s false, empty, or a whitespace string. For 
example, "", " ", nil, [], and {} are blank."
When you set a value to false it does not pass the validation.
If you want to confirm that a value is either true or false you will 
have to it in another way.

Jonhy Pear wrote:
> Just to add more information, I'm using RoR  2.3.5.
> 
> Thanks
> 
> On Thu, Apr 15, 2010 at 12:36 AM, Jonhy Pear <[email protected]> 
> wrote:
> 
>> end
>>   def after_update(user_campaign)
>>         if uc.id != user_campaign.id
>>
>> Thanks,
>>
> 
> 
> 
> --
> João Miguel Pereira
> http://jpereira.eu
> LinkedIn: http://www.linkedin.com/in/joaomiguelpereira
> [email protected]
> (351) 96 275 68 58
-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to