Skip to content
Snippets Groups Projects
Commit 8176e4bf authored by Nathan Ward's avatar Nathan Ward
Browse files

Fix client attributes so that hashes and arrays work correctly

parent 28c34bcb
No related branches found
No related tags found
No related merge requests found
...@@ -45,13 +45,13 @@ client <%= @shortname %> { ...@@ -45,13 +45,13 @@ client <%= @shortname %> {
} }
<%- end -%> <%- end -%>
<%- if defined?(@attributes) and !@attributes.empty? -%> <%- if defined?(@attributes) and !@attributes.empty? -%>
<%- if defined?(@attributes).respond_to?('join') -%> <%- if @attributes.respond_to?('join') -%>
<%= @attributes.join("\n ") %> <%= @attributes.join("\n ") %>
<%- elsif defined?(@attributes).is_a?(Hash) -%> <%- elsif @attributes.is_a?(Hash) -%>
<%- @attributes.sort.each do |k, v| -%> <%- @attributes.sort.each do |k, v| -%>
<%= k %> = <%= v %> <%= k %> = <%= v %>
<%- end -%> <%- end -%>
<%- elsif defined?(@attributes) -%> <%- else -%>
<%= @attributes %> <%= @attributes %>
<%- end -%> <%- end -%>
<%- end -%> <%- end -%>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment