Project

General

Profile

Actions

Bug #2416

closed

_puppetclasses_or_envs_changed.html.erb does not honor the RAILS_RELATIVE_URL_ROOT

Added by Sébastien Bernard over 11 years ago. Updated over 11 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Web Interface
Target version:
Difficulty:
trivial
Triaged:
Fixed in Releases:
Found in Releases:

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

puppetclass_bug.diff puppetclass_bug.diff 800 Bytes Sébastien Bernard, 04/19/2013 09:57 AM
Actions

Also available in: Atom PDF