Class: Limit
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Limit
- Defined in:
- app/models/limit.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.boolean ⇒ Object
10 11 12 |
# File 'app/models/limit.rb', line 10 def self.boolean where(:value_type => :boolean) end |
.named(name) ⇒ Object
14 15 16 |
# File 'app/models/limit.rb', line 14 def self.named(name) where(:name => name).first end |
.numbered ⇒ Object
6 7 8 |
# File 'app/models/limit.rb', line 6 def self.numbered where(:value_type => :number) end |
Instance Method Details
#allowed? ⇒ Boolean
18 19 20 |
# File 'app/models/limit.rb', line 18 def allowed? value != 0 end |