Ruby on Rails Tuesday, June 16, 2015

Hello everyone,

Thanks a lot for your help.
I finally found what was the problem, the jquery wasn't working. I checked the HTML code, everything was correct, but in the time of the event the jquery wasn't working,

The solution is in this post: 

In the file "\app\views\layouts\application.html.erb", inside the <head> tag I just included this line:
<%= javascript_include_tag :jquery, :jquery_ujs %>

So, now the application recognizes the Delete method, and it also solve another issue that I was having. The ajax commands using the command "remote: true" wasn't working, it was calling an html request instead of a JS request, so everything working good now. 

Thanks a lot for your help. 

Arthur Duarte

Em terça-feira, 16 de junho de 2015 07:51:37 UTC-3, Saravanan B escreveu:
Try this please it will work
<%= link_to "Destroy", {:controller => "comment", :action => "destroy", :id => comment.id }%>


--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/e7435f94-ab73-4bc9-9906-0b3b2fc0f601%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment