Try to look at question re POST-requests and relevant post via Net::HTTP
. If you don't use json, just adjust it correspondingly. Then add
render inline: response.body.html_safe, layout: false
inline:
means you don't need view (template) forcontroller#auth_test
actionhtml_safe
tells Rails that your HTML is safe to generate. By default Rails convert any HTML into string to prevent dumb execution of malicious code.layout: false
says to render don't use any layout, like 'layouts/application.html.erb' etc.
If needed, you can pass response to View via plain instance variable.
render response
is not working, bc Rails try to find associated route for this object in accordance with Rails conventions for render and definitely fails, while it's not ActiveRecord/ActiveModel object.