lib/papermill/papermill.rb in papermill-1.0.5 vs lib/papermill/papermill.rb in papermill-1.0.6

- old
+ new

@@ -20,10 +20,10 @@ (@papermill_associations ||= {}).merge!( assoc_name => Papermill::options.deep_merge(local_options) ) include Papermill::InstanceMethods before_destroy :destroy_assets after_create :rebase_assets - has_many :papermill_assets, :as => "Assetable", :dependent => :destroy, :order => 'assetable_key ASC, position ASC' + has_many :papermill_assets, :as => "Assetable", :dependent => :destroy define_method assoc_name do |*options| scope = PapermillAsset.scoped(:conditions => {:assetable_id => self.id, :assetable_type => self.class.base_class.name}) if assoc_name != Papermill::options[:base_association_name] scope = scope.scoped(:conditions => { :assetable_key => assoc_name.to_s })