Sha256: a6766ff18a54e392490d94126877d949751de2ced5b4d7830350b4032fd14ec7

Contents?: true

Size: 296 Bytes

Versions: 17

Compression:

Stored size: 296 Bytes

Contents

module Notifiable
  class DeviceToken < ActiveRecord::Base
    belongs_to :app, :class_name => "Notifiable::App"
    
    validates_presence_of :token, :provider, :app
  	validates_uniqueness_of :token

  	def user
  		user_id.blank? ? nil : Notifiable.user_class.find(user_id)
  	end
  end

end

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
notifiable-rails-0.18.0 lib/notifiable/device_token.rb
notifiable-rails-0.17.0 lib/notifiable/device_token.rb
notifiable-rails-0.16.0 lib/notifiable/device_token.rb
notifiable-rails-0.15.3 lib/notifiable/device_token.rb
notifiable-rails-0.15.2 lib/notifiable/device_token.rb
notifiable-rails-0.15.1 lib/notifiable/device_token.rb
notifiable-rails-0.15.0 lib/notifiable/device_token.rb
notifiable-rails-0.14.1 lib/notifiable/device_token.rb
notifiable-rails-0.14.0 lib/notifiable/device_token.rb
notifiable-rails-0.13.0 lib/notifiable/device_token.rb
notifiable-rails-0.12.1 lib/notifiable/device_token.rb
notifiable-rails-0.12.0 lib/notifiable/device_token.rb
notifiable-rails-0.11.0 lib/notifiable/device_token.rb
notifiable-rails-0.10.1 lib/notifiable/device_token.rb
notifiable-rails-0.10.0 lib/notifiable/device_token.rb
notifiable-rails-0.9.0 lib/notifiable/device_token.rb
notifiable-rails-0.8.0 lib/notifiable/device_token.rb