From: Jan Provaznik <jprovazn(a)redhat.com>
simple-navigation defines its own '@template' variable for views
(this is very very nasty btw), so if anywhere in controller's action
'@template' variable defined, it overrides simple-navigation's and an
error is thrown.
---
src/app/controllers/images_controller.rb | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/app/controllers/images_controller.rb
b/src/app/controllers/images_controller.rb
index 41c48a5..3f6ba46 100644
--- a/src/app/controllers/images_controller.rb
+++ b/src/app/controllers/images_controller.rb
@@ -215,16 +215,16 @@ class ImagesController < ApplicationController
end
uuid = UUIDTools::UUID.timestamp_create.to_s
- @template = Aeolus::Image::Warehouse::Template.create!(uuid, @xml, {
+ @tpl = Aeolus::Image::Warehouse::Template.create!(uuid, @xml, {
:object_type => 'template',
:uuid => uuid
})
uuid = UUIDTools::UUID.timestamp_create.to_s
- body =
"<image><name>#{(a)template.name}</name></image>"
+ body = "<image><name>#{(a)tpl.name}</name></image>"
@image = Aeolus::Image::Warehouse::Image.create!(uuid, body, {
:uuid => uuid,
:object_type => 'image',
- :template => @template.uuid
+ :template => @tpl.uuid
})
flash.now[:error] = t('images.flash.notice.created')
if params[:make_deployable]
--
1.7.7.5