class XmtFroala::Asset

Public Class Methods

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

Private Instance Methods

update_asset_attributes() click to toggle source
# File lib/generators/xmt_froala/migration/templates/models/active_record/xmt_froala/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