mirror of
https://github.com/ditkrg/active_model_serializers.git
synced 2026-01-23 14:29:31 +00:00
9 lines
287 B
Ruby
9 lines
287 B
Ruby
<% module_namespacing do -%>
|
|
class <%= class_name %>Serializer < <%= parent_class_name %>
|
|
<% if attributes.any? -%> attributes <%= attributes_names.map(&:inspect).join(", ") %>
|
|
<% end -%>
|
|
<% association_names.each do |attribute| -%>
|
|
has_one :<%= attribute %>
|
|
<% end -%>
|
|
end
|
|
<% end -%> |