Class: Decidim::LogReferenceGenerator

Inherits:
Object
  • Object
show all
Defined in:
app/services/decidim/log_reference_generator.rb

Instance Method Summary collapse

Constructor Details

#initialize(request) ⇒ LogReferenceGenerator

Returns a new instance of LogReferenceGenerator.



5
6
7
# File 'app/services/decidim/log_reference_generator.rb', line 5

def initialize(request)
  @request = request
end

Instance Method Details

#generate_referenceObject



9
10
11
12
# File 'app/services/decidim/log_reference_generator.rb', line 9

def generate_reference
  tags_array = generate_tags(Rails.configuration.log_tags)
  tags_array.collect { |tag| "[#{tag}] " }.join if tags_array
end