Sha256: 543de18050b45f9e04743f1279e178ee2c4cae3f5a9f51cacaba501b4c9a8a65

Contents?: true

Size: 370 Bytes

Versions: 14

Compression:

Stored size: 370 Bytes

Contents

# == Schema Information
#
# Table name: users
#
#  id         :integer         not null, primary key
#  name       :string(255)
#  created_at :datetime
#  updated_at :datetime
#

class User < ActiveRecord::Base
  
  has_many :uploads, :as => :uploadable, :order => 'created_at desc', :dependent => :destroy
  
  def can_upload?(user)
    self.id == user.id
  end
  
end

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
uploader-3.1.4 test/rails_test/app/models/user.rb
uploader-3.1.3 test/rails_test/app/models/user.rb
uploader-3.1.2 test/rails_test/app/models/user.rb
uploader-3.1.1 test/rails_test/app/models/user.rb
uploader-3.1.0 test/rails_test/app/models/user.rb
uploader-3.0.2 test/rails_test/app/models/user.rb
uploader-3.0.1 test/rails_test/app/models/user.rb
uploader-3.0.0 test/rails_test/app/models/user.rb
uploader-2.0.2 test/rails_root/app/models/user.rb
uploader-2.0.0 test/rails_root/app/models/user.rb
uploader-1.0.3 test/rails_root/app/models/user.rb
uploader-1.0.2 test/rails_root/app/models/user.rb
uploader-1.0.1 test/rails_root/app/models/user.rb
uploader-1.0.0 test/rails_root/app/models/user.rb