This is a pretty tricky one.
I get a "undefined method `protect_against_forgery?' for
#<ActionView::Base:0x569a3d4>" error when trying to generate a partial
from 'outside' the web site. I do this as I have a rake task that checks
for changes periodically in the background, and if it then sees a change
it rebuilds the partial and posts the result back to the user if he is
(The posting by rake to the web site is done with juggernaut,but that's
not the issue, the failure happens when trying to build the partial)
The building of the partial is achieved by instantiating Actionview in
the rake task, and it all worked fine until I introduced
'drop_receiving_element' into the partial that gets generated. The
latter seems to want to use protect_against_forgery? - which is not
available from the lib task.
I am feeling a bit out of my depth here.
Is it just a simple question of somehow including or requiring the
module that contains the protection stuff? How would I do this? Or is it
much more involved?
Any suggestions would be welcome!
Thanks for reading this!