search for: featured_imag

Displaying 1 result from an estimated 1 matches for "featured_imag".

Did you mean: featured_image
2007 Apr 21
0
has_many / has_one polymorphic with conditions
I''m looking for a way to make this work (I think the code is more explanatory at this point): ## THIS WORKS has_many :images, :as => :imageable, :dependent => :destroy, :order => ''position ASC'' # @product.images => # ## THIS DOESNT has_one :featured_image, :as => :imageable, :conditions => "position = 1" # @product.featured_image => NameError: uninitialized constant Product::FeaturedImage ...I could always add a "featured_image" method to the product model, but I wanted to see if this was possible first. Thanks J -...