Ruby on Rails
Saturday, October 8, 2016
You need to specify path....
-- <td><%= link_to 'About', 'about_path' %></td> # or where your /about path points to
On Saturday, October 8, 2016 at 2:35:29 AM UTC-4, kinoe - wrote:
On Saturday, October 8, 2016 at 2:35:29 AM UTC-4, kinoe - wrote:
then run error, so how make understand url this on RoR, home,edit_home_path(home) and etc, not error and make by me 'about error?'
<p id="notice"><%= notice %></p><h1>Homes</h1><table><thead><tr><th>Title</th><th>Text</th><th colspan="3"></th></tr></thead><tbody><% @homes.each do |home| %><tr><td><%= home.title %></td><td><%= home.text %></td><td><%= link_to 'Show', home %></td><td><%= link_to 'About', 'about' %></td> #this line make by me<td><%= link_to 'Edit', edit_home_path(home) %></td><td><%= link_to 'Destroy', home, method: :delete, data: { confirm: 'Are you sure?' } %></td></tr><% end %></tbody></table><br><%= link_to 'New Post', new_home_path %>
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/d2341c74-cee0-4325-8333-390858d7aa91%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment