Displaying 3 results from an estimated 3 matches for "writer_id".
Did you mean:
write_pid
2007 Sep 14
2
Testing nested controller
...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 show a note" do
do_get
response.should be_success
end
But this always ends in an error message:
You have a nil object when you didn''t expect it!
The error occurred while evaluating nil.rewrite
Can anybod...
2007 Sep 14
2
Testing a nested controller
...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 show a note" do
do_get
response.should be_success
end
But this always ends in an error message:
You have a nil object when you didn''t expect it!
The error occurred while evaluating nil.rewrite
Can anybody he...
2006 Jan 21
7
n-way joins
Hi,
I''m somewhat of a Rails newbie and am trying to understand how to
formulate n-way (3 or 4 way) joins in Rails (where the join tables
contain extra data as well.)
Let me give you my basic entities:
foos
id - pk
name - unique
bars
id - pk
name - unique
bazs
id - pk
name - unique
frozs
id - pk
name - unique
then i have two separate join tables:
foos_bars_bazs - 3 way join