Displaying 2 results from an estimated 2 matches for "notes_path".
2010 Jan 21
2
will_paginate ?
...ent.id, :method
=> ''get'' do %>
<%= text_field_tag :query, nil, :size => 20 %>
<%= submit_tag "Search" %>
<% end %>
<% end %>
notes/search.html.erb
...
<ul>
<% @notes.each do |note| %>
<li><%= link_to note.body, notes_path( note.id ) %> </li>
<% end %>
</ul>
<%= will_paginate @notes, :params => { :patient_id => @patient.id } %>
The pagination list shows fine, but when clicking on a page number, I
get the error:
You have a nil object when you didn''t expect it!
You might have...
2007 Sep 14
2
Testing nested controller
Hey everyone.
I really stuck on testing a nested controller. I''m trying to make a
request using get and afterwards checking the response by
response.should ...
My routes.rb looks like this:
map.resources :writers do |writers|
writers.resources :notes
end
In my notes_controller_spec.rb
def do_get
writer_id = 1
note_id = 1
get note_path(writer_id, note_id)
end
it "should