Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[rails6] Use relative paths for layouts #7574

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app/controllers/application_controller/report_downloads.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ def render_pdf_internal(report)
def render_pdf_internal_rr(report, result)
@options = report_print_options(report, result) # used by the layouts/print
render(
:template => '/layouts/print/report',
:layout => '/layouts/print',
:template => 'layouts/print/report',
:layout => 'layouts/print',
:locals => {
:report => report,
:data => result.html_rows.join
Expand Down Expand Up @@ -122,8 +122,8 @@ def print_report

@options = report_print_options(result.report, result) # used by the layouts/print
render(
:template => '/layouts/print/report',
:layout => '/layouts/print',
:template => 'layouts/print/report',
:layout => 'layouts/print',
:locals => {
:report => result.report,
:data => result.html_rows.join
Expand Down Expand Up @@ -231,7 +231,7 @@ def set_summary_pdf_data
end

disable_client_cache
render :template => '/layouts/print/textual_summary', :layout => '/layouts/print'
render :template => 'layouts/print/textual_summary', :layout => 'layouts/print'
end
end
end
4 changes: 2 additions & 2 deletions spec/controllers/application_controller/compare_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@

expect(controller).to receive(:render).with(
hash_including(
:template => '/layouts/print/report',
:layout => '/layouts/print',
:template => 'layouts/print/report',
:layout => 'layouts/print',
:locals => hash_including(
:report # the report does not match due to a ".dup" call in the controller.
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
end

it "returns with print" do
expect(controller).to receive(:render).with(:layout => '/layouts/print', :template => '/layouts/print/textual_summary')
expect(controller).to receive(:render).with(:layout => 'layouts/print', :template => 'layouts/print/textual_summary')
controller.send(:set_summary_pdf_data)
end
end
Expand Down