[Git][noosfero/noosfero][stable-1.10] Merge branch 'plugin_routes_order' into 'master'
Rodrigo Souto
gitlab at mg.gitlab.com
Tue Dec 12 12:27:17 BRST 2017
Rodrigo Souto pushed to branch stable-1.10 at Noosfero / noosfero
Commits:
65bac908 by Rodrigo Souto at 2017-12-12T14:27:13+00:00
Merge branch 'plugin_routes_order' into 'master'
Fixes plugin controller routes ordering
See merge request noosfero/noosfero!1358
(cherry picked from commit f93ac488c16b64a45679cc81ef860c01fd61cd51)
7088835b Fixes plugin controller routes ordering
- - - - -
1 changed file:
- config/routes/50_plugins.rb
Changes:
=====================================
config/routes/50_plugins.rb
=====================================
--- a/config/routes/50_plugins.rb
+++ b/config/routes/50_plugins.rb
@@ -16,6 +16,12 @@ Dir.glob Rails.root.join plugins_root, '*', 'controllers' do |controllers_dir|
hash[folder] = Dir.glob("#{path}{*.rb,#{plugin_name}_plugin/*.rb}").map do |filename|
filename.gsub(path, '').gsub(/[_\/]controller.rb$/, '')
end
+
+ # Pushes the default plugin controller to the end of the list, otherwise
+ # it might obfuscate the routes that are listed after it.
+ plugin_controller = hash[folder].delete("#{plugin_name}_plugin")
+ hash[folder].push(plugin_controller) if plugin_controller.present?
+
hash
end
View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/65bac908b9e7878fb9f2e98d535aebcdf445530d
---
View it on GitLab: https://gitlab.com/noosfero/noosfero/commit/65bac908b9e7878fb9f2e98d535aebcdf445530d
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20171212/dbc71a2e/attachment-0001.html>
More information about the Noosfero-dev
mailing list