> In short, I would > leave the post processing of input to the methods that are tasked to do > it. I'm sure you're right. I was just sorting of thinking out loud, fishing for other people's opinions.
It just seemed to me that some basic pre-processing of user input by the Rails subsystem could alleviate having to handle these issues on a nearly-every-case basis. I can't think of too many cases where I would want to preserve the leading and trailing whitespace from a text field. So I'd rather have to add some extra code in order to preserve whitespace, rather than adding code to practically every model to ensure I'm getting them trimmed. I think it would be actually be nice if accessing something like params[:some_value] for :some_value to be trimmed of leading and trailing whitespace unless told otherwise. Conrad Taylor wrote: > On Tue, Sep 23, 2008 at 6:06 AM, Robert Walker < > [EMAIL PROTECTED]> wrote: > >> This is one of two things that I personally wish was done differently in >> experimenting with that... >> > > You have a good idea but I don't think that you want to start modifying > the > standard functionality of Rails helpers that are to mirror the standard > HTML > tags. > Also, it seems that you have written more in your argument to add > trimming > to the > text field tag than it took to actually write the ruby code to do it. > :-) > In short, I would > leave the post processing of input to the methods that are tasked to do > it. > > -Conrad -- Posted via http://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 rubyonrails-talk@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---