On Tue, Oct 28, 2008 at 7:47 PM, Ashley Moran <[EMAIL PROTECTED] > wrote:
> > Hi > > Does anyone have an example of using error_messages_for[1] > "inline" (with :before => false)? > > I can't make it work, and the documentation is not very clear on this > feature. > > Thanks > Ashley > > [1] > http://merbivore.com/documentation/0.9.9/doc/rdoc/merb-helpers/index.html?a=M000396&name=error_messages_for > > -- > http://www.patchspace.co.uk/ > http://aviewfromafar.net/ > > Hi Not really sure what you're trying to do... error_messages_for is for objects that impelment an errors method (And some others) like orm models and the session.authentication object. You can't just pass it a hash to display... It allows an object to accumulate errors and then display them. It's useful when you try to save an object and the validations don't allow it to be saved. The ORM will setup errors onto the object and you would use it in your views like this <%= error_messages_for @obj_that_has_errors %> HTH Daniel --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "merb" 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/merb?hl=en -~----------~----~----~----~------~----~------~--~---
