[PATCH/foreman 1/1] fixes #1123 api for config_templates needs to return additional attributes

Signed-off-by: Corey Osman <corey@logicminds.biz>

··· --- app/models/config_template.rb | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/app/models/config_template.rb b/app/models/config_template.rb
index ab1e6fd…ea25035 100644
— a/app/models/config_template.rb
+++ b/app/models/config_template.rb
@@ -87,7 +87,7 @@ class ConfigTemplate < ActiveRecord::Base
end

def as_json(options={})

  • super({:only => [:name, :template, :snippet]}.merge(options))
  • super({:only => [:name, :template, :id, :snippet],:include => [:template_kind]}.merge(options))
    end

end

1.7.4.1

Ohad,

Please update ticket #1123 to say "api for config_templates needs to return additional attributes."

I will address optional template code in json in a future ticket.

Corey Osman
corey@logicminds.biz
678-348-0582 Pacific Time

Green I.T and Datacenter Automation Specialist

··· On Oct 2, 2011, at 3:41 PM, Corey Osman wrote:

Signed-off-by: Corey Osman corey@logicminds.biz

app/models/config_template.rb | 2 ±
1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/app/models/config_template.rb b/app/models/config_template.rb
index ab1e6fd…ea25035 100644
— a/app/models/config_template.rb
+++ b/app/models/config_template.rb
@@ -87,7 +87,7 @@ class ConfigTemplate < ActiveRecord::Base
end

def as_json(options={})

  • super({:only => [:name, :template, :snippet]}.merge(options))
  • super({:only => [:name, :template, :id, :snippet],:include => [:template_kind]}.merge(options))
    end

end

1.7.4.1