Sha256: ce10a8d99e5ae4d1b2ed37831118b7d33aa08a2f6a4e9cf3cb2d4ad9b153f7c8

Contents?: true

Size: 315 Bytes

Versions: 47

Compression:

Stored size: 315 Bytes

Contents

class Limit < ActiveRecord::Base
  belongs_to :plan

  validates_presence_of :name, :value

  def self.numbered
    where(:value_type => :number)
  end

  def self.boolean
    where(:value_type => :boolean)
  end

  def self.named(name)
    where(:name => name).first
  end

  def allowed?
    value != 0
  end
end

Version data entries

47 entries across 47 versions & 1 rubygems

Version Path
saucy-0.2.28.1 app/models/limit.rb
saucy-0.3.1 app/models/limit.rb
saucy-0.3.0 app/models/limit.rb
saucy-0.2.45 app/models/limit.rb
saucy-0.2.44 app/models/limit.rb
saucy-0.2.43 app/models/limit.rb
saucy-0.2.42 app/models/limit.rb
saucy-0.2.41 app/models/limit.rb
saucy-0.2.40 app/models/limit.rb
saucy-0.2.39 app/models/limit.rb
saucy-0.2.38 app/models/limit.rb
saucy-0.2.36 app/models/limit.rb
saucy-0.2.35 app/models/limit.rb
saucy-0.2.34 app/models/limit.rb
saucy-0.2.33 app/models/limit.rb
saucy-0.2.32 app/models/limit.rb
saucy-0.2.31 app/models/limit.rb
saucy-0.2.30 app/models/limit.rb
saucy-0.2.29 app/models/limit.rb
saucy-0.2.28 app/models/limit.rb