this is what I want to do.
a href="javascript:sayHello('an nyung')"> click here /a
this code is in a server side.
and I wanna to call this link from a client side by using ruby.
is there any way to do this?
this is what I want to do.
a href="javascript:sayHello('an nyung')"> click here /a
this code is in a server side.
and I wanna to call this link from a client side by using ruby.
is there any way to do this?
You probably mean to use the link_to_remote method:
<%= link_to_remote('click here', say_hello_path('an nyung')) %>
This will make a call to the server when the link is clicked by the user.