class Kindeditor::Asset

Public Class Methods

collection_name() click to toggle source
# File lib/generators/rails_kindeditor/migration/templates/models/mongoid/kindeditor/asset.rb, line 16
def self.collection_name
  :kindeditor_assets
end

Private Instance Methods

update_asset_attributes() click to toggle source
# File lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/asset.rb, line 8
def update_asset_attributes
  if asset.present? && asset_changed?
    self.file_size = asset.file.size
    self.file_type = asset.file.content_type
  end
end