Class: Dorsale::TagListForModel

Inherits:
Service
  • Object
show all
Defined in:
app/services/dorsale/tag_list_for_model.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Service

call

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

#modelObject (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

#callObject



8
9
10
11
12
13
# File 'app/services/dorsale/tag_list_for_model.rb', line 8

def call
  model
    .tags_on(:tags)
    .order(:name)
    .pluck(:name)
end