class Wangeditor::Asset
Public Class Methods
collection_name()
click to toggle source
# File lib/generators/rails_wangeditor/migration/templates/models/mongoid/wangeditor/asset.rb, line 16 def self.collection_name :wangeditor_assets end
Private Instance Methods
update_asset_attributes()
click to toggle source
# File lib/generators/rails_wangeditor/migration/templates/models/active_record/wangeditor/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