Take a look at customizing the ''ActionView::Base.field_error_proc
proc'' in
your environment.rb file. Here is a post will an example:
http://blog.cosmoknot.com/?p=77
Darian Shimy
--
http:/www.darianshimy.com
http://twitter.com/dshimy
On Sun, Nov 15, 2009 at 1:11 PM, Todd A. Jacobs <
tjacobs-sndr-b4faac-S/bPM5e9wgfNLxjTenLetw@public.gmane.org> wrote:
>
> Rails seems to expect views to contain one form field per line. I have
> several views that put multiple input fields on a single line (e.g. for
> phone number components). As an example:
>
> <p>
> <%= f.label ''Phone: '' %>
> (<%= f.text_field :phone_areacode, :maxlength=>3 %>)
> <%= f.text_field :phone_prefix, :maxlength=>3
> %>-<%= f.text_field :phone_suffix, :maxlength=>4 %>
> <%= f.label ''Ext.'' %>
> <%= f.text_field :phone_extension, :maxlength=>5 %>*
> </p>
>
> When validation fails, rails displays fieldwitherror divs that format
> these concatenated lines as separate lines, confusing the intent of the
> layout. I edited the scaffold.css to try to fix this by changing
> .fieldWithErrors from "display: table" to "display:
inline-table", but
> while that fixed *most* fields it doesn''t seem to prevent line
breaks on
> the ''('' character.
>
> I''ve gone about as far as my current knowledge allows in tracking
down
> what''s causing this formatting issue. How can I keep the entire
set of
> fields on one line when reporting errors?
>
> --
> "Oh, look: rocks!"
> -- Doctor Who, "Destiny of the Daleks"
>
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---