Jim Burgess wrote: > pepe wrote: >> If you do, please post the solution. I would like to know. > > Hi Pepe, > > so, after a week of trying I finally found the solution and am posting > it here in case it helps anyone else. > > Error message in model: > > errors.add(field, "This field is too long.\nYou are using > #{self[field].length} characters out of a permitted #{permitted}.") > > And in the view: > <%= simple_format(error_message_on :applicant, :thesis) %>
You could also probably put a literal "<br>" in the error message, then use unescape_html. > > Thanks very much for your help. > > http://apidock.com/rails/ActionView/Helpers/TextHelper/simple_format Best, -- Marnen Laibow-Koser http://www.marnen.org mar...@marnen.org -- 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-t...@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.