Commit 3562d426ab9d3a99bf5e3242a2fa61b673cde301

Authored by Evandro Junior
1 parent cb6e853e

Corrected fix for plugin route bug if username contains dots

Showing 1 changed file with 1 additions and 1 deletions   Show diff stats
lib/noosfero/plugin/routes.rb
... ... @@ -18,7 +18,7 @@ Dir.glob(Rails.root.join(plugins_root, '*', 'controllers')) do |controllers_dir|
18 18 controllers_by_folder.each do |folder, controllers|
19 19 controllers.each do |controller|
20 20 controller_name = controller.gsub("#{plugin_name}_plugin_",'')
21   - if %w[profile myprofile].include?(folder)
  21 + if %w[profile myprofile].include?(folder.to_s)
22 22 match "#{prefixes_by_folder[folder]}/#{plugin_name}/#{controller_name}(/:action(/:id))", :controller => controller, :profile => /#{Noosfero.identifier_format}/
23 23 else
24 24 match "#{prefixes_by_folder[folder]}/#{plugin_name}/#{controller_name}(/:action(/:id))", :controller => controller
... ...