Project

General

Profile

Actions

Refactor #12457

closed

Use .exists? to check subnet exists for Rails 4 compatibility

Added by Daniel Lobato Garcia almost 8 years ago. Updated about 5 years ago.

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

Description

On app/models/subnet.rb, the method `self.import` uses 'if first(:conditions => attrs)`. It no longer is an alias for `find(:first, *args)` but now it just fetches the first X records (`first(X)`). `.exists?` is a suitable equivalent


Related issues 1 (0 open1 closed)

Related to Foreman - Tracker #3157: Rails 4.1 upgrade tasksClosed09/27/2013

Actions
Actions #1

Updated by Daniel Lobato Garcia almost 8 years ago

Actions #2

Updated by The Foreman Bot almost 8 years ago

  • Status changed from New to Ready For Testing
  • Assignee set to Daniel Lobato Garcia
  • Pull request https://github.com/theforeman/foreman/pull/2907 added
Actions #3

Updated by Dominic Cleal almost 8 years ago

  • translation missing: en.field_release set to 71
Actions #4

Updated by Daniel Lobato Garcia almost 8 years ago

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

Also available in: Atom PDF