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.247 lib/gameui/asset3d.rb
ish_models-0.0.33.246 lib/gameui/asset3d.rb
ish_models-0.0.33.245 lib/gameui/asset3d.rb
ish_models-0.0.33.244 lib/gameui/asset3d.rb
ish_models-0.0.33.243 lib/gameui/asset3d.rb
ish_models-0.0.33.242 lib/gameui/asset3d.rb
ish_models-0.0.33.241 lib/gameui/asset3d.rb
ish_models-0.0.33.240 lib/gameui/asset3d.rb
ish_models-0.0.33.239 lib/gameui/asset3d.rb
ish_models-0.0.33.238 lib/gameui/asset3d.rb
ish_models-0.0.33.237 lib/gameui/asset3d.rb
ish_models-0.0.33.236 lib/gameui/asset3d.rb
ish_models-0.0.33.235 lib/gameui/asset3d.rb
ish_models-0.0.33.234 lib/gameui/asset3d.rb
ish_models-0.0.33.233 lib/gameui/asset3d.rb
ish_models-0.0.33.232 lib/gameui/asset3d.rb
ish_models-0.0.33.231 lib/gameui/asset3d.rb
ish_models-0.0.33.230 lib/gameui/asset3d.rb
ish_models-0.0.33.229 lib/gameui/asset3d.rb
ish_models-0.0.33.228 lib/gameui/asset3d.rb