repost
repost copied to clipboard
Error no template found while using Repost::Senpai to redirect API
Hi,
I'm trying to use this gems to redirect to other POST action in other controller API.
Repost::Senpai.perform('http://xxxx', params: { auth: request.params[:user] })
However I receive this error No template found for xxController#create, rendering head :no_content
. I tried to add html.erb in views to solve that error. But after that, the response from my API is the HTML from the view. So it doesn't redirect to action in another controller, but only render the view.
Can anyone give me further explanation of how to use this gems to redirect controller API? I have followed the documentation, but still can't redirect to the POST action
Thank you in advance
@intanpuspita you can set autosubmit: false
and try to debug step by step using default </form/> with post method:
Repost::Senpai.perform('http://xxxx', params: { auth: request.params[:user] }, options: {autosubmit: false} )