app/models/effective/attachment.rb in effective_assets-0.1 vs app/models/effective/attachment.rb in effective_assets-1.0.0

- old
+ new

@@ -10,16 +10,11 @@ structure do position :integer, :validates => [:presence, :numericality] box :string, :default => 'assets', :validates => [:presence] # This is essentially a category end + default_scope -> { includes(:asset).order("\"#{EffectiveAssets.attachments_table_name.to_s}\".\"position\" ASC, \"#{EffectiveAssets.attachments_table_name.to_s}\".\"asset_id\" ASC") } + validates_presence_of :asset_id - #attr_accessible :box, :position, :asset_id, :attachable_type, :attachable_id - - class << self - def default_scope - includes(:asset).order(:position) - end - end end end