app/models/family_gallery/group.rb in family_gallery-0.0.4 vs app/models/family_gallery/group.rb in family_gallery-0.0.5

- old
+ new

@@ -1,7 +1,9 @@ class FamilyGallery::Group < ActiveRecord::Base translates :name, :description + belongs_to :user_owner, class_name: "User" + has_many :group_picture_links, dependent: :destroy has_many :pictures, through: :group_picture_links scope :ordered_by_latest_update, -> { joins(:pictures).order("family_gallery_pictures.updated_at DESC").group("family_gallery_groups.id") } end