Sha256: 5d30506507ec5d7c9a5676960c3c1dbe9857fba6f27638056c7b8574301838a4

Contents?: true

Size: 1.04 KB

Versions: 4

Compression:

Stored size: 1.04 KB

Contents

# require 'aws-sdk'
require 'mongoid_paperclip'

class ::Gameui::Asset3d
  include Mongoid::Document
  include Mongoid::Timestamps
  include Mongoid::Paperclip
  include Ish::Utils

  belongs_to :marker,        class_name: 'Gameui::Marker', optional: true
  belongs_to :invoice,       class_name: 'Ish::Invoice',   optional: true
  belongs_to :email_message, class_name: 'Office::EmailMessage', optional: true, inverse_of: :asset3ds

  has_mongoid_attached_file :object,
                            :storage => :s3,
                            :s3_credentials => ::S3_CREDENTIALS,
                            :path => "assets3d/:id/:filename",
                            :s3_protocol => 'https',
                            :validate_media_type => false,
                            s3_region: ::S3_CREDENTIALS[:region]

  do_not_validate_attachment_file_type :object

  def export_fields
    %w|
      marker_id invoice_id
      asset3d_file_name asset3d_content_type asset3d_file_size asset3d_updated_at asset3d_fingerprint
    |;
  end

end
GA3 = ::Gameui::Asset3d

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ish_models-3.0.0.1 lib/gameui/asset3d.rb
ish_models-0.0.33.302 lib/gameui/asset3d.rb
ish_models-0.0.33.301 lib/gameui/asset3d.rb
ish_models-0.0.33.300 lib/gameui/asset3d.rb