Class: TemplatePart
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- TemplatePart
- Defined in:
- app/models/template_part.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
14 15 16 |
# File 'app/models/template_part.rb', line 14 def index @index ||= new_record? ? "0#{rand(1000)}" : id end |
#part_type_name=(name) ⇒ Object
18 19 20 |
# File 'app/models/template_part.rb', line 18 def part_type_name=(name) self.part_type = PartType.find_by_name(name) end |