Sha256: b17213733a199105e4c21b0519d18532615b0a8195aedcea0835f903ea39e4e6
Contents?: true
Size: 587 Bytes
Versions: 6
Compression:
Stored size: 587 Bytes
Contents
# frozen_string_literal: true module Phlexible module Rails module ActionController module MetaTags extend ActiveSupport::Concern def meta_tags @meta_tags ||= {} end def meta_tag(name, content) meta_tags[name] = content end module ClassMethods def meta_tag(name, content, **kwargs) before_action(**kwargs) do |ctrl| ctrl.meta_tag name, content.is_a?(Proc) ? ctrl.instance_exec(&content) : content end end end end end end end
Version data entries
6 entries across 6 versions & 1 rubygems