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 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 24 January 2011 13:44, Chandu80 <chandu.shenoy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> 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 -- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
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. -- 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-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
*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 Lancaster> ------------------------------------------------------------------------ > > Robert Walker <mailto:lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org> > January 24, 2011 8:29 AM > > > > 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. > > ------------------------------------------------------------------------ > > Chandu80 <mailto:chandu.shenoy-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> > January 24, 2011 7:44 AM > > > 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 >-- 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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.