I'm building a rails app based off of the railsguide
http://guides.rubyonrails.org/getting_started.html
The syntax it calls for in the erb is...
<td><%= link_to 'Destroy', article_path(article),
method: :delete,
data: { confirm: 'Are you sure?' } %></td>
For some reason this reads as
https://localhost:3000/articles/[#]
where # is the given record to delete. In other words, I want to delete a record, and it interprets my code as showing said record.
What could I be doing wrong?
more info
This is what is generated dynamically
<td>
<a rel="nofollow" data-method="delete" href="/articles/2">Destroy</a>
</td>
application.html.erb has the following...
<%= javascript_include_tag 'default', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
controller definition
def destroy
@article= Article.find(params[:id])
@article.destroy
redirect_to articles_path
end
Error associated with using 'application' in application.html.erb
ExecJS::ProgramError in Welcome#index
Showing E:/scabase/app/views/layouts/application.html.erb where line #6 raised:
TypeError: Object doesn't support this property or method
(in C:/RailsInstaller/Ruby1.9.3/lib/ruby/gems/1.9.1/gems/turbolinks- 2.5.3/lib/assets/javascripts/turbolinks.js.coffee)