My problem is simple. I have a function "translateTo(lang)" that i need to call in my show_data.rhtml file. The function that i need to call returns a string that i need to print out on my show_data.rhtml page. Should i define the function in the show_data_controller.rb? or some were else? What commands should i have in the show_data.rhtml? show_data.rhtml file .. .. .. <%= translateTo(@trans)%> <%# What shall i do to make this line work %> .. .. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, you should define the in the application_helper.rb if it is to be used by all views or show_data_helper if it is only to be used with views of show_data. Good luck, -Conrad On 6/28/07, Manic <QQQMQQQ-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > My problem is simple. I have a function "translateTo(lang)" that i > need to call in my show_data.rhtml file. The function that i need to > call returns a string that i need to print out on my show_data.rhtml > page. > > Should i define the function in the show_data_controller.rb? or some > were else? > > What commands should i have in the show_data.rhtml? > > show_data.rhtml file > .. > .. > .. > <%= translateTo(@trans)%> <%# What shall i do to make this line work > %> > .. > .. > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
Hi, you should define the in the application_helper.rb if it is to be used by all views or show_data_helper if it is only to be used with views of show_data. Good luck, -Conrad On 6/28/07, Manic <QQQMQQQ-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > My problem is simple. I have a function "translateTo(lang)" that i > need to call in my show_data.rhtml file. The function that i need to > call returns a string that i need to print out on my show_data.rhtml > page. > > Should i define the function in the show_data_controller.rb? or some > were else? > > What commands should i have in the show_data.rhtml? > > show_data.rhtml file > .. > .. > .. > <%= translateTo(@trans)%> <%# What shall i do to make this line work > %> > .. > .. > > > > >--~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---