Sha256: ff6aed1939173335376fff327909540b557d294824bc7abb138f3b8c5770d280

Contents?: true

Size: 857 Bytes

Versions: 84

Compression:

Stored size: 857 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

  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
      asset3d_file_name asset3d_content_type asset3d_file_size asset3d_updated_at asset3d_fingerprint
    |;
  end

end

Version data entries

84 entries across 84 versions & 1 rubygems

Version Path
ish_models-0.0.33.267 lib/gameui/asset3d.rb
ish_models-0.0.33.266 lib/gameui/asset3d.rb
ish_models-0.0.33.265 lib/gameui/asset3d.rb
ish_models-0.0.33.264 lib/gameui/asset3d.rb
ish_models-0.0.33.263 lib/gameui/asset3d.rb
ish_models-0.0.33.262 lib/gameui/asset3d.rb
ish_models-0.0.33.261 lib/gameui/asset3d.rb
ish_models-0.0.33.260 lib/gameui/asset3d.rb
ish_models-0.0.33.259 lib/gameui/asset3d.rb
ish_models-0.0.33.258 lib/gameui/asset3d.rb
ish_models-0.0.33.257 lib/gameui/asset3d.rb
ish_models-0.0.33.256 lib/gameui/asset3d.rb
ish_models-0.0.33.255 lib/gameui/asset3d.rb
ish_models-0.0.33.254 lib/gameui/asset3d.rb
ish_models-0.0.33.253 lib/gameui/asset3d.rb
ish_models-0.0.33.252 lib/gameui/asset3d.rb
ish_models-0.0.33.251 lib/gameui/asset3d.rb
ish_models-0.0.33.250 lib/gameui/asset3d.rb
ish_models-0.0.33.249 lib/gameui/asset3d.rb
ish_models-0.0.33.248 lib/gameui/asset3d.rb