Project

General

Profile

Actions

Refactor #13883

closed

Host::Managed.last_report_object association uses deprecated :order parameter

Added by Dominic Cleal about 8 years ago. Updated almost 6 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Rails
Target version:
Difficulty:
Triaged:
Fixed in Releases:
Found in Releases:

Description

The last_report_object association on Host::Managed uses a deprecated :order parameter, but should use a scope block and call the order() method, e.g.

has_one :last_report_object, ... :order => "#{Report.table_name}.id DESC"

becomes

has_one :last_report_object, -> { order("#{Report.table_name}.id DESC") }

The interfaces association in Host::Base was already changed like this in #7230.


Related issues 3 (0 open3 closed)

Related to Foreman - Bug #14012: Errors on hosts status, configuration status is out of syncClosedMarek Hulán03/02/2016Actions
Has duplicate Foreman - Bug #14352: Configuration status is getting marked out of sync incorrectlyDuplicate03/24/2016Actions
Blocks Foreman - Feature #13244: Upgrade Ruby on Rails to 4.2ClosedDominic Cleal01/15/2016Actions
Actions

Also available in: Atom PDF