[Rails] Re: Validations problem

2010-04-10 Thread pepe
Are you somehow inserting a blank in your model with a before_save or similar callback? What is the value of the column in the created record? Are you the only one with access to the DB tables? Could somebody have changed the column to allow now null values? On Apr 9, 7:45 am, Hemant Bhargava wro

[Rails] Re: Validations problem

2010-04-10 Thread Viorel
You should remove:null => false. With it, you have a 0 in any new record, so validates_presence_of :employee_id will return true. -- 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-t...

Re: [Rails] Re: Validations problem

2010-04-09 Thread Franz Strebel
In which file is this test written and how are you running it? Also, these kinds of tests are not very useful because they try to test the framework, ActiveRecord in this case. Tests should target the intended behavior of your application. -- You received this message because you are subscribed

[Rails] Re: Validations problem

2010-04-09 Thread Hemant Bhargava
Anthony wrote: > it is impossible!! > Hey i know that is impossible.. That's why i am asking you people.. i have posted my migrations and validations here as well.. Can you please look at them and tell me .. -- Posted via http://www.ruby-forum.com/. -- You received this message because you ar