D
doolittle
Hello all, I have a few models:
class Collection < ActiveRecord::Base
has_many :collection_images
has_many :images, :through => :collection_images, rder => "id desc"
end
class CollectionImage < ActiveRecord::Base
belongs_to :image
belongs_to :collection
end
class Image < Resource
has_many :collection_images
has_many :collections, :through => :collection_images
end
.... which seems to be the typical "has_many through" situation. Now
where my error occurs is when I call something like this from the
controller:
@images = Image.findall, :limit => 15, rder => "resources.id
desc", :include => :collections)
and it bombs when the view calls:
<% @images.each_with_index do |i, j| %>
This is just one example of a few places I've found this (revolving
around the same models in different situations) error in a number of
places in my app after uploading to textdrive. What I'm confused of
most is if the problem is my code (since it worked for me in dev) or
the production enviroment.
Much thanks in advanced,
Paul
class Collection < ActiveRecord::Base
has_many :collection_images
has_many :images, :through => :collection_images, rder => "id desc"
end
class CollectionImage < ActiveRecord::Base
belongs_to :image
belongs_to :collection
end
class Image < Resource
has_many :collection_images
has_many :collections, :through => :collection_images
end
.... which seems to be the typical "has_many through" situation. Now
where my error occurs is when I call something like this from the
controller:
@images = Image.findall, :limit => 15, rder => "resources.id
desc", :include => :collections)
and it bombs when the view calls:
<% @images.each_with_index do |i, j| %>
This is just one example of a few places I've found this (revolving
around the same models in different situations) error in a number of
places in my app after uploading to textdrive. What I'm confused of
most is if the problem is my code (since it worked for me in dev) or
the production enviroment.
Much thanks in advanced,
Paul