>>> buggy.
>>
>>
>>
>> Started POST "/trials" for 127.0.0.1 at Thu Jul 05 10:26:19 -0700 2012
>>    (1.2ms)  commit transaction
>> Completed 200 OK in 39ms (Views: 37.9ms | ActiveRecord: 0.2ms)
>>
>>
>>
>> Started GET "/assets/trials.js?body=1" for 127.0.0.1 at Thu Jul 05
>> 10:26:45 -0700 2012
>> Served asset /trials.js - 304 Not Modified (0ms)
>>
>>
>>
>> The last request "GET /trials" renders only the old records and not the
>> new record that i have just created.

>There should be some sql fetching the records for the index view.  It
>seems it has not fetched the records at all.  Can you post
>index.html.erb.  Copy/Paste it obviously.  If it is large then use
>pastebin.com or similar.

Index.html.erb :

<h1>Listing trials</h1>

<table>
  <tr>
    <th>Name</th>
    <th>Email</th>
    <th></th>
    <th></th>
    <th></th>
  </tr>

<% @trials.each do |trial| %>
  <tr>
    <td><%= trial.name %></td>
    <td><%= trial.email %></td>
    <td><%= link_to 'Show', trial %></td>
    <td><%= link_to 'Edit', edit_trial_path(trial) %></td>
    <td><%= link_to 'Destroy', trial, :confirm => 'Are you sure?', 
:method => :delete %></td>
  </tr>
<% end %>
</table>

<br />

<%= link_to 'New Trial', new_trial_path %>

-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en-US.

Reply via email to