Hi folks, I need to access a controller level action from another action. This is accessed by the view (so need authenticity token)
def post_message
#creates the message
#normally accessed via webform with authenticity token
end
def post_via_email
#my virtual mailserver calls this method when it receives an email
#i need to call the post_message function
end
I know that if i call the former with post_message(), it will be a GET call. There will be no authenticity token.
How do i call the former function AS IF I am accessing it from the webpage, along with the params and token?