Forum: Ruby on Rails Need help with calling a ruby method inside rhtml

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
1d9783ceece84ead1d52df0f53e13ee3?d=identicon&s=25 Manic (Guest)
on 2007-06-28 23:21
(Received via mailing list)
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
%>
..
..
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (Guest)
on 2007-06-28 23:31
(Received via mailing list)
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
40db9e75b3f5899258e3bdc0c9210154?d=identicon&s=25 Conrad Taylor (Guest)
on 2007-06-28 23:32
(Received via mailing list)
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
This topic is locked and can not be replied to.