Deprecated Dynamic Actions
Rails routes have supported dynamic actions in the past, like this:
# config/routes.rb
get 'ui(/:action)', controller: 'ui'
The 'Today I Learned' application uses code like this to create design templates.
This will be deprecated in Rails 5.1. If you want to address the change now, while still supporting a variety of routes, one solution is to name them explicitly:
# config/routes.rb
namespace 'ui' do
%w(index edit show).each do |action|
get action, action: action
end
end
Tweet