Class: Color
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Color
- Defined in:
- app/models/color.rb
Overview
Class Method Summary (collapse)
- + (Object) blue
- + (Object) green
- + (Object) orange
- + (Object) purple
- + (Object) red
- + (Object) yellow
Instance Method Summary (collapse)
Class Method Details
+ (Object) blue
11 12 13 |
# File 'app/models/color.rb', line 11 def self.blue find_by! label: 'Blue' end |
+ (Object) green
15 16 17 |
# File 'app/models/color.rb', line 15 def self.green find_by! label: 'Green' end |
+ (Object) orange
31 32 33 |
# File 'app/models/color.rb', line 31 def self.orange find_by! label: 'Orange' end |
+ (Object) purple
27 28 29 |
# File 'app/models/color.rb', line 27 def self.purple find_by! label: 'Purple' end |
+ (Object) red
23 24 25 |
# File 'app/models/color.rb', line 23 def self.red find_by! label: 'Red' end |
+ (Object) yellow
19 20 21 |
# File 'app/models/color.rb', line 19 def self.yellow find_by! label: 'Yellow' end |
Instance Method Details
- (Object) slug
35 36 37 |
# File 'app/models/color.rb', line 35 def slug label.underscore.dasherize.parameterize end |