class Simplemde::Asset
Private Instance Methods
update_asset_attributes()
click to toggle source
# File lib/generators/rails_simplemde_editor/migration/templates/models/active_record/simplemde/asset.rb, line 9 def update_asset_attributes if asset.present? && asset_changed? self.file_size = asset.file.size self.file_type = asset.file.content_type end end