FormRelayer
Makes it easier to relay received POST params in current form for further POSTing. This is ideal if you want to insert an intermediate page during POSTing, such as an order confirmation page.
Installation
Add this line to your application's Gemfile:
gem 'form_relayer'
And then execute:
$ bundle install
Usage
In Rails view, place a call to relay_received_post_params
inside the form.
<%= form_for @post do |f| %>
Are you sure you want to continue?
<%= relay_received_post_params %>
<%= f.submit 'Yes' %>
<% end %>
This will automatically turn POST params received by the current action into hidden input tags.
Contributing
- Fork it ( https://github.com/GoodLife/form_relayer/fork )
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create a new Pull Request