RubyGems Navigation menu

rails_source_path 1.0.3

Remember the route prior to the current controller and redirect/use later In rails project, one common case is one form used to create or update an object can be routed from more than one page, when the object is created or updated, it should be redirected back to wherever it came from. Rails redirect_back doesn't work in this case because: 1. redirect_back in create/update action will go back to new/edit form. 2. usually the form is re-rendered if any error exists, which basically breaks the redirect_back. rails-source-path can hanlde this by explicily specifying the entry actions and remember the previous route in session store, hence can be used in the whole controller. Also a helper method is providered so it can be used in view like 'back' or 'cancel' button.

Gemfile:
= 复制到剪贴板 已复制!

安装:
=

版本列表:

  1. 1.0.3 - April 18, 2020 (8.0 KB)
  2. 1.0.2 - September 06, 2019 (8.0 KB)
  3. 1.0.1 - September 06, 2019 (8.0 KB)

Runtime 依赖 (2):

activesupport >= 3.0
rails >= 4.0.2

Development 依赖 (4):

bundler ~> 1.17
rake >= 12.3.3
rspec ~> 3.0

业主:

推送:

作者:

  • Leo Li

SHA 256 校验和:

8c16d2914366e45b28779e227af52d04244c36de53b14ec67e0c86802d276d30

下载总量 5,739

这个版本 2,219

许可:

MIT

需要的 Ruby 版本: >= 0

链接: