Sha256: d58b1fcfd1a2e4d899a25187f9589be29d6d116a8dc08903ad6236e1e58ecbee

Contents?: true

Size: 723 Bytes

Versions: 3

Compression:

Stored size: 723 Bytes

Contents

module Locomotive
  module Steam
    module Liquid
      module Tags
        module Csrf

          class Param < ::Liquid::Tag

            def render(context)
              %{<input type="hidden" name="authenticity_token" value="helloworld" />}
            end

          end

          class Meta < ::Liquid::Tag

            def render(context)
              %{
                <meta name="csrf-param" content="authenticity_token" />
                <meta name="csrf-token" content="helloworld" />
              }
            end

          end

        end

        ::Liquid::Template.register_tag('csrf_param', Csrf::Param)
        ::Liquid::Template.register_tag('csrf_meta', Csrf::Meta)

      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
locomotivecms_steam-0.1.2.pre.beta lib/locomotive/steam/liquid/tags/csrf.rb
locomotivecms_steam-0.1.1 lib/locomotive/steam/liquid/tags/csrf.rb
locomotivecms_steam-0.1.0 lib/locomotive/steam/liquid/tags/csrf.rb