RE: Re: label tag with errors?

Paul,

You can do this by creating a custom form builder. Do some research on
that. Here is a place to start:

http://rails.techno-weenie.net/question/2006/4/28/pattern_for_editing_models

Chris


From: [email protected]
[mailto:[email protected]] On Behalf Of Paul B.
Sent: Monday, May 08, 2006 12:50 PM
To: [email protected]
Subject: [Rails] Re: label tag with errors?

any advice on this? a lable tag that has a different class if the
property has errors…
On 5/7/06, Paul B. < [email protected]> wrote:
I’d like to create a label tag that has a special css class if has
errors. So Ideally, I’d like:

<%= label(‘object’,‘property’,‘Property’) %>

To generate:

Property

And if there are errors on object.property, generate this:

Property

First of all, is there an easy way to do this?

I’m assuming there isn’t, so I thought it shouldn’t be too hard to
create my own helped to do this, but after taking a look at the source
for the other tags (text_field, check_box, etc.), it’s not clear how to
do it. Any ideas?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs