Re: [rspec-users] Troubles with route_for

2010-01-24 Thread Randy Harmon
I guess the distinction is that you generate food_path()'s based on existing food names, and search comes from users - but you don't have a distinct landing page for each food, hence no need for resource-based routing for foods. You could define a :show action in your controller, which simply call

Re: [rspec-users] Stub activerecord find given instance?

2010-01-24 Thread Saverio Miroddi
David Chelimsky wrote: > It'd be much easier to help you if you could provide an example more > representative of what you are actually trying to accomplish. So, here it is (note: this is NOT representative of a properly engineered behavior): class MyModel def my_parent self.find( my_paren

Re: [rspec-users] Stub activerecord find given instance?

2010-01-24 Thread Paul Hinze
On Sun, Jan 24, 2010 at 5:10 PM, Saverio Miroddi wrote: > David Chelimsky wrote: >> It'd be much easier to help you if you could provide an example more >> representative of what you are actually trying to accomplish. > > class MyModel >  def my_parent >    self.find( my_parent_id ) >  end > end >