nikolalsvk / render_async

render_async lets you include pages asynchronously with AJAX
https://rubygems.org/gems/render_async/
MIT License
1.08k stars 75 forks source link

Add examples for rendering non-GET requests #59

Closed nikolalsvk closed 6 years ago

nikolalsvk commented 6 years ago

There's a hint in the 1.3.0 release but it's not enough, it should be added to the README too.

Something along these lines, but with an explanation:

<%= render_async some_post_path,
                 method: 'POST',
                 data: { fresh: 'AF' },
                 headers: { 'Content-Type': 'text' } %>