#202 open
Peter Aitken

Unnecessary escaping of date selector fields when used with file field

Reported by Peter Aitken | March 19th, 2009 @ 12:25 PM

When using webrat 0.4.2 and Rails 2.3 RC2 I have hit the following problem.

Give I have a form with a date selector and a attachment file field,
and I select a date and have nothing in the file field, the folling attributes arrive correctly at the controllers create action.

my_date(1i): 2007
my_date(2i): 5
my_date(3i): 21

All looks good.

Then if I attach a file and fill in the date again the controller recieves...

my_date%281i%29: 2007
my_date%282i%29: 5
my_date%283i%29: 21
my_attachment: #File:0x644cce8

This results in the my_date attribute not being set in the model due to expecting to recieve keys like,

and not

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

Ruby Acceptance Testing for Web applications.

Shared Ticket Bins