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 #1

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
Actions #2

Updated by Dominic Cleal over 11 years ago

  • Status changed from Assigned to Ready For Testing
Actions #3

Updated by Sébastien Bernard over 11 years ago

  • Status changed from Ready For Testing to Closed
  • % Done changed from 0 to 100
Actions

Also available in: Atom PDF