Project

General

Profile

Actions

Refactor #13883

closed

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

Added by Dominic Cleal over 8 years ago. Updated over 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 #1

Updated by The Foreman Bot over 8 years ago

  • Status changed from Assigned to Ready For Testing
  • Pull request https://github.com/theforeman/foreman/pull/3234 added
Actions #2

Updated by Dominic Cleal over 8 years ago

Actions #3

Updated by Dominic Cleal over 8 years ago

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

Updated by Dominic Cleal over 8 years ago

  • Translation missing: en.field_release set to 136
Actions #5

Updated by Marek Hulán over 8 years ago

  • Related to Bug #14012: Errors on hosts status, configuration status is out of sync added
Actions #6

Updated by Dominic Cleal over 8 years ago

  • Translation missing: en.field_release changed from 136 to 71
Actions #7

Updated by Stephen Benjamin over 8 years ago

  • Has duplicate Bug #14352: Configuration status is getting marked out of sync incorrectly added
Actions #8

Updated by Stephen Benjamin over 8 years ago

  • Bugzilla link set to 14352
Actions #9

Updated by Stephen Benjamin over 8 years ago

  • Bugzilla link changed from 14352 to 1321104
Actions

Also available in: Atom PDF