Rals 3.0
My question is using link_to_remote to make an ajax call.
2.3.8 Ajax call
<%= link_to_remote image_tag("../images/services_button.jpg", :mouseover =>
"../images/services_button_over.jpg"), :url =>{:controller => :dashboard, :action => :service} %>
Current View -
<% link_to_remote view_path do %>
About Us<span>Who we are</span>
<% end %>
How do I go about turning my current view code into an ajax call ? I've tried something like this ...
<% link_to_remote "hello", :url=>{:controller=>:sae,:action=>:bam} do %>
About Us<span>Who we are</span>
<% end %>
Thanks for your help in advance.
Trying to do basic...basic.. UJS.
Very simple AJAX call to make a div go up. Though it's not working. Trying to transition from 2.3.8 to 3.0. Any help is greatly appreciated. I've googled, though I'm not able to make any sense of the jargon. :( Thanks in advance
View:
<div class="test">
Whompa
</div>
<%= link_to 'Blind-Up', :controller=>:home,:actions=>:test, :remote =>true %>
Controller:
def test
render :update do |page|
page[:test].visual_effect :blind_up
end
end