Project

General

Profile

Actions

Refactor #12457

closed

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

Added by Daniel Lobato Garcia over 8 years ago. Updated about 6 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

Also available in: Atom PDF