Module: Carnival::ModelHelper
- Defined in:
- app/models/carnival/model_helper.rb
Defined Under Namespace
Modules: ClassMethods
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.included(mod) ⇒ Object
7 8 9 |
# File 'app/models/carnival/model_helper.rb', line 7 def self.included mod mod.extend ClassMethods end |
Instance Method Details
#to_label ⇒ Object
3 4 5 |
# File 'app/models/carnival/model_helper.rb', line 3 def to_label self.respond_to?(:name) ? self.name : self.to_s end |