Sha256: 65237bc3580e415ef21bcd8a4f486dc931ef48240c1aaa7fa0b1965f8ef8ea51

Contents?: true

Size: 941 Bytes

Versions: 29

Compression:

Stored size: 941 Bytes

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

  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

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
ish_models-0.0.33.299 lib/gameui/asset3d.rb
ish_models-0.0.33.298 lib/gameui/asset3d.rb
ish_models-0.0.33.297 lib/gameui/asset3d.rb
ish_models-0.0.33.296 lib/gameui/asset3d.rb
ish_models-0.0.33.295 lib/gameui/asset3d.rb
ish_models-0.0.33.294 lib/gameui/asset3d.rb
ish_models-0.0.33.293 lib/gameui/asset3d.rb
ish_models-0.0.33.292 lib/gameui/asset3d.rb
ish_models-0.0.33.291 lib/gameui/asset3d.rb
ish_models-0.0.33.287 lib/gameui/asset3d.rb
ish_models-0.0.33.286 lib/gameui/asset3d.rb
ish_models-0.0.33.285 lib/gameui/asset3d.rb
ish_models-0.0.33.284 lib/gameui/asset3d.rb
ish_models-0.0.33.283 lib/gameui/asset3d.rb
ish_models-0.0.33.282 lib/gameui/asset3d.rb
ish_models-0.0.33.281 lib/gameui/asset3d.rb
ish_models-0.0.33.280 lib/gameui/asset3d.rb
ish_models-0.0.33.279 lib/gameui/asset3d.rb
ish_models-0.0.33.278 lib/gameui/asset3d.rb
ish_models-0.0.33.277 lib/gameui/asset3d.rb