lib/generators/serializer/templates/serializer.rb in active_model_serializers-0.5.1 vs lib/generators/serializer/templates/serializer.rb in active_model_serializers-0.5.2
- old
+ new
@@ -1,9 +1,8 @@
<% module_namespacing do -%>
class <%= class_name %>Serializer < <%= parent_class_name %>
-<% if attributes.any? -%> attributes <%= attributes_names.map(&:inspect).join(", ") %>
-<% end -%>
+ attributes <%= attributes_names.map(&:inspect).join(", ") %>
<% association_names.each do |attribute| -%>
has_one :<%= attribute %>
<% end -%>
end
-<% end -%>
\ No newline at end of file
+<% end -%>