Project

General

Profile

Actions

Bug #12021

closed

Use .to_param to find parent object in LookupKeys controller

Added by Daniel Lobato Garcia over 8 years ago. Updated almost 6 years ago.

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

Description

On Rails 4, .find will not default to .friendly.find so find_hostgroup, find_environment and find_host will fail for non numeric IDs. However, we can use from_param to find these objects. This is something we can do both on Rails 3 and Rails 4, whereas using .friendly isn't an option until friendly_id 5.0, which depends on Rails 4.

Actions

Also available in: Atom PDF