So this won't fix the problem of user input outside the browser, but
what about implementing the date fields as <select>'s instead of text
fields?  You will still have to sanitize the data but at least you
have defined the format in which the user inputs it through the
browser.

On May 12, 10:09 am, Ar Chron <[email protected]>
wrote:
> Jim Burgess wrote:
>
> > At the moment it is sitting at the top of my model, but the method is
> > quite long and this looks a bit ugly / cluttered.
>
> Sometimes code is ugly no matter what... ;)
>
> I remember having to account for the difference between little-endian
> veruss big-endian architectures on a project, and writing a whole
> comment paragraph about just why I was twiddling two bytes of data in
> the buffer stream before extracting it into the long int I wanted...
>
> > Is there anywhere else I can put this code?
>
> If it belongs to the model, it should be in the model, unless it really
> is a larger 'sub-system' that merits its own module.
>
> Of course, it *could* always be just the first entry into your
> 'application_extensions' module as well, but when I find modules with
> just one or two methods that are only used by one class, there's a 'Why
> oh why?' moment.
>
> Just my $0.02.
> --
> Posted viahttp://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