Link relative report path instead of absolute URL

You can reach a development server under localhost, 127.0.0.1, 0.0.0.0
or other names you define in your environment. The reports were using
absolute links to localhost though and therefore breaking your session
(login) while navigating.

I'm not sure why this was done though. Sebastian didn't explain this in
the commit message and it may have been accidental.
This commit is contained in:
Maikel Linke
2023-01-04 15:43:12 +11:00
parent 70b1888d45
commit da4069679c
2 changed files with 2 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
%ul{style: "margin-left: 12pt"}
- report_subtypes.each do |report_subtype|
%li
- url = main_app.admin_report_url(report_type: report_type, report_subtype: report_subtype[1])
- url = main_app.admin_report_path(report_type: report_type, report_subtype: report_subtype[1])
= link_to report_subtype[0], url

View File

@@ -1,7 +1,7 @@
- content_for :page_title do
= @report_title
= form_for @report.search, :url => url_for(only_path: false) do |f|
= form_for @report.search, :url => url_for do |f|
%fieldset.no-border-bottom.print-hidden
%legend{ align: 'center'}= t(:report_filters)
= render partial: "admin/reports/filters/#{@report_type}", locals: { f: f }