Ruby on Rails Friday, October 7, 2016

<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 %>
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?'

--
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/40397c12-6320-4337-b812-4a591f42b327%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment