Hi Philip, I am reasonably new to rails, i've fallen in love with it :). Reading your response, though I understand what your saying but I don't have enough knowledge on how one can do something like that, could you be generous enough to share some resource links or something where I could read something about it? Thanks!
Thanks & Regards, Dhruva Sagar. Stephen Leacock<http://www.brainyquote.com/quotes/authors/s/stephen_leacock.html> - "I detest life-insurance agents: they always argue that I shall some day die, which is not so." On Tue, Aug 25, 2009 at 5:29 AM, Philip Hallstrom <[email protected]> wrote: > > > Does anyone know a way to override .blank? method that rails provides. > > I want to add additional custom checks (specific to my application) to > > this method. > > I'd tread very carefully here. I know I use .blank? all over the > place. I imagine Rails and lots of plugins do as well. You may well > be changing behavior in libraries you're not aware of... > > I'd suggest if at all possible to create your own .my_blank? method > (with a better name of course) and use that where appropriate. > > Otherwise... search the rails source for "def blank?" and then simply > override it by monkey patching it. > > > > --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---

