Commit ceb4170b

mo khan <mo@mokhan.ca>
2013-07-02 03:37:36
always sort the photos collection on a creation
1 parent 71b219e
Changed files (1)
app
app/models/creation.rb
@@ -6,7 +6,7 @@ class Creation < ActiveRecord::Base
   attr_accessible :user_id, :story, :name, :category_ids, :is_restricted, :watermark
   belongs_to :user
   has_and_belongs_to_many :categories, :join_table => 'creations_categories', :uniq => true, :autosave => true
-  has_many :photos, :dependent => :destroy
+  has_many :photos, :dependent => :destroy, :order => :created_at
   has_many :favorites, :dependent => :destroy
   acts_as_taggable