Hello,
as I was updating the current devlop branch for foreman this morning the
following error appears whenever I edit a host, that's been connected to a
given ComputeResource.
The following error appears there:
ActionView::Template::Error (undefined method
gettext_translation_for_attribute_name' for Fog::Compute::Libvirt::Server:Class): 1: <% new = f.object && f.object.new? -%> 2: <%= text_f f, :name, :disabled => !new if controller_name != "hosts" %> 3: <%= selectable_f f, :cpus, 1..compute_resource.max_cpu_count, { }, :class => "input-mini",:disabled => !new %> 4: <%= selectable_f f, :memory, memory_options(compute_resource.max_memory), { }, :class => "span2", :disabled => !new %> 5: 6: <!--NICS--> app/helpers/layout_helper.rb:124:in
block in field'
The full trace can be seen here:
http://pastebin.com/fm89dEJq
I kind of fixed it as follows but I'm not sure if this is in anyways as
intended. Please point me what to do?
diff --git a/app/helpers/layout_helper.rb b/app/helpers/layout_helper.rb
index 2773f90…5d189c9 100644
— a/app/helpers/layout_helper.rb
+++ b/app/helpers/layout_helper.rb
@@ -121,7 +121,7 @@ module LayoutHelper
help_inline = inline.blank? ? '' : content_tag(:span, inline, :class
=> "help-inline")
help_block = content_tag(:span, options.delete(:help_block), :class
=> "help-block")
content_tag :div, :class => "control-group #{fluid ? "row-fluid" : ""}
#{error.empty? ? "" : 'error'}" do
-
label = options.delete(:label) ||
s_(f.object.class.gettext_translation_for_attribute_name attr)
-
label = options.delete(:label) || ((f.object.class.respond_to?
:gettext_translation_for_attribute_name) &&
s_(f.object.class.gettext_translation_for_at
label_tag(attr, label, :class=>"control-label").html_safe +
content_tag(:div, :class => "controls") do
yield.html_safe + help_inline.html_safe + help_block.html_safe
At least this patch makes the error go away
Regards Marc.