Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Convert csrf_meta_tags to use the tag helper

#6474

csrf_meta_tags is one of the few places that use an html string and not the tag helper. Seems like it should for consistency (and for picking up overrides to the tag helper, which I was doing in project when I discovered this).

I'm not excited about the tap & join pattern, so I'm happy to change it.

Reported by Daniel Morrison · February 26th, 2011 @ 06:47 PM

State: new
Milestone: none
Assigned to: nobody
Importance: none

Activity

  1. robinjam
    robinjam

    The tap-and-join thing seems needlessly complicated. Something like this should work:

    [tag('meta', {:name => 'csrf-param', :content => request_forgery_protection_token}), tag('meta', {:name => 'csrf-token', :content => form_authenticity_token})].join("\n").html_safe

    Aside from that, this is a good fix. Have you tried submitting a pull request?

    April 6th, 2011 @ 03:09 AM