Sha256: 1b41922393a2133a46720f8b91428b3f30a177bd7deffc44239dd99e13adcbd6

Contents?: true

Size: 286 Bytes

Versions: 11

Compression:

Stored size: 286 Bytes

Contents

class Kindeditor::Asset < ActiveRecord::Base
  set_table_name "kindeditor_assets"
  validates_presence_of :asset
  before_save :update_asset_attributes
  
  private
  def update_asset_attributes
    self.file_size = asset.file.size
    self.file_type = asset.file.content_type
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
rails_kindeditor-0.2.8 lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/asset.rb
rails_kindeditor-0.2.7 lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/asset.rb
rails_kindeditor-0.2.6 lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/asset.rb
rails_kindeditor-0.2.5 lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/asset.rb
rails_kindeditor-0.2.3 lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/asset.rb
rails_kindeditor-0.2.2 lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/asset.rb
rails_kindeditor-0.2.1 lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/asset.rb
rails_kindeditor-0.2.0 lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/asset.rb
rails_kindeditor-0.1.2 lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/asset.rb
rails_kindeditor-0.1.1 lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/asset.rb
rails_kindeditor-0.1.0 lib/generators/rails_kindeditor/migration/templates/models/active_record/kindeditor/asset.rb