Project

General

Profile

Bug #13755

Allow iterating over ActiveRecord CollectionProxy in safe mode rendering

Added by Marek Hulán over 3 years ago. Updated about 1 year ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
Templates
Target version:
Difficulty:
Triaged:
Bugzilla link:
Team Backlog:
Fixed in Releases:
Found in Releases:

Description

When we use something like

<% @host.interfaces.each %>

I see an error like this

There was an error rendering the Preseed default finish template: The snippet 'preseed_networking_setup' threw an error: undefined method 'each' for Safemode::Jail (ActiveRecord::Associations::CollectionProxy)

Related issues

Related to Foreman - Bug #13168: Rendering of kickstart_networking_setup fails: undefined method 'each' for Safemode::Jail (ActiveRecord::AssociationRelation)Closed2016-01-13

Associated revisions

Revision 55033bc8 (diff)
Added by Marek Hulán over 3 years ago

Fixes #13755 - allow reading of AR collections with safe mode enabled

History

#1 Updated by Marek Hulán over 3 years ago

  • Related to Bug #13168: Rendering of kickstart_networking_setup fails: undefined method 'each' for Safemode::Jail (ActiveRecord::AssociationRelation) added

#2 Updated by The Foreman Bot over 3 years ago

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

#3 Updated by Anonymous over 3 years ago

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

Also available in: Atom PDF