Actions
Bug #13168
closedRendering of kickstart_networking_setup fails: undefined method 'each' for Safemode::Jail (ActiveRecord::AssociationRelation)
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'
Updated by Dominic Cleal almost 9 years ago
- Status changed from New to Assigned
- Assignee set to Dominic Cleal
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
Updated by Dominic Cleal almost 9 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset ac735d74fe1e0664d61c6746d526d453511a92f3.
Updated by Marek Hulán almost 9 years ago
- Related to Bug #13755: Allow iterating over ActiveRecord CollectionProxy in safe mode rendering added
Actions