Sha256: 6319d1d53720915ce73d4f687a59d53f0230ed499f8fa1022b040ea069ab1413

Contents?: true

Size: 342 Bytes

Versions: 8

Compression:

Stored size: 342 Bytes

Contents

module NetSuiteRails
  class PollTimestamp < ActiveRecord::Base
    serialize :value

    validates :key, presence: true, uniqueness: true

    def self.for_class(klass)
      self.where(key: "netsuite_poll_#{klass.to_s.downcase}timestamp").first_or_initialize
    end

    def self.table_name_prefix
      'netsuite_'
    end
    
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
netsuite_rails-0.3.5 lib/netsuite_rails/poll_timestamp.rb
netsuite_rails-0.3.4 lib/netsuite_rails/poll_timestamp.rb
netsuite_rails-0.3.3 lib/netsuite_rails/poll_timestamp.rb
netsuite_rails-0.3.2 lib/netsuite_rails/poll_timestamp.rb
netsuite_rails-0.3.1 lib/netsuite_rails/poll_timestamp.rb
netsuite_rails-0.2.2 lib/netsuite_rails/poll_timestamp.rb
netsuite_rails-0.2.1 lib/netsuite_rails/poll_timestamp.rb
netsuite_rails-0.2.0 lib/netsuite_rails/poll_timestamp.rb