P520 ff example code
Reported by David W. Body | February 2nd, 2008 @ 02:36 PM | in Second Edition
Several of the examples starting on p. 520 have class ItemController as a subclass of ActiveResource::Base instead of ActionController::Base.
Comments and changes to this ticket
-

Ricky Lui February 7th, 2008 @ 08:34 AM
also, I think the Item.find(:all, :conditions => {....
should be replaced by:
Item.find(:all, :params => ...
-

Ricky Lui February 7th, 2008 @ 09:18 AM
Oh... I think I'm mistaken. I think you're intending to show the ItemController on the local side (where Item is an ActiveRecord). Then on pg 521, you call Item.find(:all, :from => :used) on the remote side, where Item is an ActiveResource.
Suggestion: for readers who are not very familiar with ActiveResources, maybe clarify which piece of code is local vs remote? e.g. say
#pg 522
class Item < ActiveRecord::Base
...
end
class ItemController < ...
#pg 523
class Item < ActiveResource::Base
...
end
>> used_item = Item.find(:all, :from => :used)
Please Login or create a free account to add a new comment.
You can update this ticket by sending an email to from your email client. (help)
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
