Class: Pulitzer::Tag
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Pulitzer::Tag
- Defined in:
- app/models/pulitzer/tag.rb
Class Method Summary collapse
Instance Method Summary collapse
Class Method Details
.named(name = "") ⇒ Object
19 20 21 |
# File 'app/models/pulitzer/tag.rb', line 19 def self.named(name = "") find_by name: name end |
Instance Method Details
#root? ⇒ Boolean
23 24 25 |
# File 'app/models/pulitzer/tag.rb', line 23 def root? hierarchical? && parent_id.nil? end |