Class: Dorsale::TagListForModel
- Defined in:
- app/services/dorsale/tag_list_for_model.rb
Instance Attribute Summary collapse
-
#model ⇒ Object
readonly
Returns the value of attribute model.
Instance Method Summary collapse
- #call ⇒ Object
-
#initialize(model) ⇒ TagListForModel
constructor
A new instance of TagListForModel.
Methods inherited from Service
Constructor Details
#initialize(model) ⇒ TagListForModel
Returns a new instance of TagListForModel.
4 5 6 |
# File 'app/services/dorsale/tag_list_for_model.rb', line 4 def initialize(model) @model = model end |
Instance Attribute Details
#model ⇒ Object (readonly)
Returns the value of attribute model.
2 3 4 |
# File 'app/services/dorsale/tag_list_for_model.rb', line 2 def model @model end |
Instance Method Details
#call ⇒ Object
8 9 10 11 12 13 |
# File 'app/services/dorsale/tag_list_for_model.rb', line 8 def call model .(:tags) .order(:name) .pluck(:name) end |