Change label names in Rails application

Hello All,
I am new to Rails.I have created an application which basically shows
the Name,
Seat,Address,Email and Phone Number on the webpage.
There are buttons to add,show,edit and destroy new contacts.
I want to change the label in the erb at the location app\views
\libraries.
What code can be used to change it,as mere change of labels in HTML
text gives error.

Regards
Chandrika

On 24 January 2011 13:44, Chandu80 [email protected] wrote:

Hello All,
I am new to Rails.I have created an application which basically shows
the Name,
Seat,Address,Email and Phone Number on the webpage.
There are buttons to add,show,edit and destroy new contacts.
I want to change the label in the erb at the location app\views
\libraries.
What code can be used to change it,as mere change of labels in HTML
text gives error.

Can you show us the bit of view code giving the problem? Also what
you have tried that gives problems and what the error is. If you are
using f.label have you checked the docs to see what the parameters of
that are?

Colin

Chandu80 wrote in post #977129:

Hello All,
I am new to Rails.I have created an application which basically shows
the Name,
Seat,Address,Email and Phone Number on the webpage.
There are buttons to add,show,edit and destroy new contacts.
I want to change the label in the erb at the location app\views
\libraries.
What code can be used to change it,as mere change of labels in HTML
text gives error.

ERb is just HTML with some Ruby embedded, so you should be able to
change those labels easily. Could you show us an example of what you’ve
changed that is causing errors? It’s hard to help without knowing what
you’ve done.

*For the form label helpers you can do one of two things:
*
= f.label :attribute_name, ‘Label String’

or you can use I18n

/# app/views/libraries/…/
= f.label :attribute_name

/# en.yml/
en:
activerecord:
libraries:

*If you’re just using label_tag, then the format is *
= label_tag ‘for_value’, ‘Text to be displayed’

Hope this helps,
Garrett L.