Module: SeoSensei::Controllers::Helpers

Extended by:
ActiveSupport::Concern
Defined in:
lib/seo_sensei/controllers/helpers.rb

Instance Method Summary collapse

Instance Method Details

#seo_tags_with(resource) ⇒ Object



29
30
31
32
33
34
35
36
37
# File 'lib/seo_sensei/controllers/helpers.rb', line 29

def seo_tags_with(resource)
  if (translated_seo = ::SeoSensei::Lookup.call(controller_name: controller_name, action_name: action_name, resource: resource))
    attributes_service = ::SeoSensei::SeoAttributes.new(
      translated_seo, resource, url_for(only_path: false)
    )

    set_meta_tags(attributes_service.call)
  end
end