Permalink
Browse files

Fixed bug where the correct order was not set on the images relations…

…hip.
  • Loading branch information...
1 parent ce6a0de commit c76cab287bcd206f0b55a9e0e1316cb6bc1a921f @djones committed Feb 9, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/portfolio_entry.rb
@@ -14,7 +14,7 @@ class PortfolioEntry < ActiveRecord::Base
default_scope :order => 'lft ASC'
acts_as_indexed :fields => [:title, :image_titles, :image_names]
- has_many :images_portfolio_entries
+ has_many :images_portfolio_entries, :order => 'images_portfolio_entries.position ASC'
has_many :images, :through => :images_portfolio_entries, :order => 'images_portfolio_entries.position ASC'
accepts_nested_attributes_for :images, :allow_destroy => false

0 comments on commit c76cab2

Please sign in to comment.