active_model_serializers/lib/generators/serializer/templates/serializer.rb
2015-02-25 14:20:18 -06:00

9 lines
254 B
Ruby

<% module_namespacing do -%>
class <%= class_name %>Serializer < <%= parent_class_name %>
attributes <%= attributes_names.map(&:inspect).join(", ") %>
end
<% association_names.each do |attribute| -%>
attribute :<%= attribute %>
<% end -%>
<% end -%>