Sha256: ecde5b44432ed574b5be8ce2c10c4f3c947fce9dcebf9699cf2b62f70fe7dae8

Contents?: true

Size: 334 Bytes

Versions: 4

Compression:

Stored size: 334 Bytes

Contents

class FamilyGallery::Group < ActiveRecord::Base
  translates :name, :description

  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

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
family_gallery-0.0.4 app/models/family_gallery/group.rb
family_gallery-0.0.3 app/models/family_gallery/group.rb
family_gallery-0.0.2 app/models/family_gallery/group.rb
family_gallery-0.0.1 app/models/family_gallery/group.rb