Sha256: 5d817edd3525babf21918d6397f7900307ee5a5986033e2f60f2d1fa4651aa6f

Contents?: true

Size: 348 Bytes

Versions: 8

Compression:

Stored size: 348 Bytes

Contents

class Ckeditor::Picture < Ckeditor::Asset

  mount_uploader :data, CkeditorPictureUploader, mount_on: :data_file_name

  has_many :contents, foreign_key: :image_id, class_name: Georgia::Content

  def featured?
    @featured ||= !contents_count.zero?
  end

  def pages
    @pages ||= contents.map(&:contentable).map(&:page).compact.uniq
  end

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
georgia-0.7.7 app/models/ckeditor/picture.rb
georgia-0.7.6 app/models/ckeditor/picture.rb
georgia-0.7.5 app/models/ckeditor/picture.rb
georgia-0.7.4 app/models/ckeditor/picture.rb
georgia-0.7.3 app/models/ckeditor/picture.rb
georgia-0.7.2 app/models/ckeditor/picture.rb
georgia-0.7.1 app/models/ckeditor/picture.rb
georgia-0.7.0 app/models/ckeditor/picture.rb