Project

General

Profile

Actions

Bug #13168

closed

Rendering of kickstart_networking_setup fails: undefined method 'each' for Safemode::Jail (ActiveRecord::AssociationRelation)

Added by Dominic Cleal almost 9 years ago. Updated over 6 years ago.

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

Description

With safemode enabled, rendering of the default kickstart_networking_setup snippet fails as some of the lookups (probably @host.managed_interfaces or similar) are now relations rather than arrays.

2016-01-13T08:40:35 [app] [W] »There was an error rendering the Kickstart default template: «
 | ActionView::Template::Error: The snippet 'kickstart_networking_setup' threw an error: undefined method 'each' for Safemode::Jail (ActiveRecord::AssociationRelation)
 | /home/dcleal/code/foreman/foreman/lib/foreman/renderer.rb:75:in `rescue in snippet'
 | /home/dcleal/code/foreman/foreman/lib/foreman/renderer.rb:72:in `snippet'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/safemode-1.2.2/lib/safemode/scope.rb:37:in `method_missing'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/safemode-1.2.2/lib/safemode.rb:226:in `bind'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/safemode-1.2.2/lib/safemode.rb:51:in `eval'
 | /home/dcleal/.rvm/gems/ruby-2.0.0-p353@foreman/gems/safemode-1.2.2/lib/safemode.rb:51:in `eval'
 | /home/dcleal/code/foreman/foreman/lib/foreman/renderer.rb:16:in `render_safe'
 | /home/dcleal/code/foreman/foreman/lib/foreman/renderer.rb:103:in `unattended_render'

Related issues 1 (0 open1 closed)

Related to Foreman - Bug #13755: Allow iterating over ActiveRecord CollectionProxy in safe mode renderingClosedMarek Hulán02/17/2016Actions
Actions #1

Updated by Dominic Cleal almost 9 years ago

  • Status changed from New to Assigned
  • Assignee set to Dominic Cleal
Actions #2

Updated by The Foreman Bot almost 9 years ago

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

Updated by Dominic Cleal almost 9 years ago

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

Updated by Marek Hulán almost 9 years ago

  • Related to Bug #13755: Allow iterating over ActiveRecord CollectionProxy in safe mode rendering added
Actions

Also available in: Atom PDF