Rails Form block in helper - How do i include “Protect from forgery”
问题 I'm trying to build a form block for my liquid theme language. I have based my approach on this answer. How ever the answer seems to be incomplete. The problem is that protect from forgery and some other methods are unavailable. Causing an error: Liquid error: undefined method `protect_against_forgery?' for # This is my code: class LiquidFormTag < Liquid::Block include ActionView::Context include ActionView::Helpers::FormHelper def initialize(tag_name, markup, tokens) super end def render