I've been searching for a solution to inline form error messages without
using a plugin.

For example, for the Email field, this is what I came up with...

-----------------------------------------
<%= user_form.label :email %>
<%= user_form.text_field :email %>
<% unless @account.errors["companies.users.email"] == nil %>
  Email <%= @account.errors["companies.users.email"][0] %>
<% end %>
-----------------------------------------

It works just fine, but I was wondering if you might have a suggestion
to simplify the code. I'm a newbie and I don't always write code the
most concise way.

-- 
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 [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