Sha256: b508372af8c0558f68e36c0d0e8b03aeda5d7e0780fbb6fda5f3dd56a8c07625

Contents?: true

Size: 455 Bytes

Versions: 1

Compression:

Stored size: 455 Bytes

Contents

module Fooltip
  class Container < ::ActiveRecord::Base
    mount_uploader :image, ImageUploader
    translates :title, :description, fallbacks_for_empty_translations: true
    has_many :links, dependent: :destroy
    has_many :associations, dependent: :destroy
    has_many :popups, through: :links
    accepts_nested_attributes_for :translations, :links

    def display_name
      (title.blank? ? image.file.file : title) rescue to_s
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fooltip-0.0.13 app/models/fooltip/container.rb