Bug #2416
closed_puppetclasses_or_envs_changed.html.erb does not honor the RAILS_RELATIVE_URL_ROOT
Description
We deployed foreman with a prefix URI /foreman.
The application works ok with the RAILS_RELATIVE_URL_ROOT but for the import from smart-proxy.
The page has a form with 2 buttons that points to an relative url without the "/foreman".
We located the problem in the "app/views/common/_puppetclasses_or_envs_changed.html.erb".
The links are like this:
<%= form_tag "/#{controller_path}/obsolete_and_new" do ->
<= link_to "Cancel","/" + controller_path, :class => "btn" %>
Once changed to :
<%= form_tag eval("obsolete_and_new_#{controller_name}_path") do ->
<= link_to "Cancel", eval("obsolete_and_new_#{controller_name}_path"), :class => "btn" %>
The links works ok with the prefix correctly appended.
I'm not sur about the Cancel link. I've attached a diff file to the bug.
Files
Updated by Dominic Cleal over 11 years ago
- Status changed from New to Assigned
- Assignee changed from Ohad Levy to Dominic Cleal
- Target version set to 1.2.0
Updated by Dominic Cleal over 11 years ago
- Status changed from Assigned to Ready For Testing
Updated by Sébastien Bernard over 11 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset be8d401b084a1712ce7e5416fce9d3eee410fe0e.