Dear all,

I get a stupid bug and i don't know if there is something wrong in
rails or if it is me doing a stupid thing.

I have a checkbox called (ass_tg) in my form and when i saved my
form , i write in my model:

  before_save :test


  def test
    puts "-----------------------"
    puts ass_tg_change
    puts "-------------------------"
  end


I should have a nil answer but I get  in my console :

-----------------------
0
0
-------------------------

And I have this attributes save in the SQL log ..(I didn't change the
status of the checkbox ...)

UPDATE `companies` SET .... `ass_tg` = 0,...... WHERE `....


It seems like rails don't like integer attributes equal to 0 when it
execute all the change functions  (change, changed?, was ...) ??

Best regards,

Thank you for your help,
Antoine

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Core" 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-core?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to