[Rails] Re: Testing fields

2009-05-25 Thread Jim Burgess
> Assuming this is a unit test then I think it should be > application.dob_day = "01" etc. > Again the attriutes are dob_day etc not date_of_birth_day. Thanks for that Colin, def test_should_make_date applicant = Applicant.new(valid_applicant_attributes(:date_of_birth => "")) applicant.dob_da

[Rails] Re: Testing fields

2009-05-25 Thread Colin Law
2009/5/25 Jim Burgess > > Hi, > > I have a model named 'applicant'. > Applicant has various fields, one of them is 'date_of_birth' > I have split the field 'date of birth' into three fields: > 'dob_day', 'dob_month', 'dob_year' > > From the view: > <% form_for :applicant, :url=> {:action => "inde

[Rails] Re: Testing fields

2009-05-25 Thread Jim Burgess
Probably doesn't make any difference to your understanding, but I forgot to mention that in my model is also: attr_reader :dob_day, :dob_month, :dob_year -- Posted via http://www.ruby-forum.com/. --~--~-~--~~~---~--~~ You received this message because you are su