Wednesday, 15 February 2012

Undefined method link_to_remote error Rails -



Undefined method link_to_remote error Rails -

i create link_to_remote error:

nomethoderror in tasks#index showing /users/overallduka/youimports_app/app/views/tasks/index.html.erb line #6 raised: undefined method `link_to_remote' #<#<class:0x1022c76f0>:0x10216ff00> extracted source (around line #6): 3: <div id="all_tasks"> 4: <% @tasks.each |task| %> 5: &nbsp;<%= task.title %><br /> 6: <p class="about_task"><%= link_to_remote task.status,"alert('aaa')" %> <%= task.about %></p> 7: <% end %> 8: </div>

i dont know wrong create sample alert test error persistes, dont know wrong in view are:

nomethoderror in tasks#index

showing /users/overallduka/youimports_app/app/views/tasks/index.html.erb line #6 raised:

undefined method `link_to_remote' #<#:0x10216ff00> extracted source (around line #6):

<% @tasks.each |task| %> &nbsp;<%= task.title %><br /> <p class="about_task"><%= link_to_remote (status(task.status)),"alert('aaa')" %> <%= task.about %></p> <% end %>

link_to_remote , other remote ajax helpers have been removed in rails 3 , moved gem https://github.com/rails/prototype_legacy_helper. if trying run simple js after clicking link, utilize link_to_function instead

link_to_function 'test_alert', 'alert("test")'

ruby-on-rails ruby-on-rails-3 ruby-on-rails-3.1 ruby-on-rails-3.2

No comments:

Post a Comment