Sha256: b0e88f38070d9ee07b2b73d6c87093a16102796f8a850f09e647eb9821dc0251

Contents?: true

Size: 287 Bytes

Versions: 3

Compression:

Stored size: 287 Bytes

Contents

<% 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 -%>

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
active_model_serializers-0.5.1 lib/generators/serializer/templates/serializer.rb
active_model_serializers-0.5.0 lib/generators/serializer/templates/serializer.rb
active_model_serializers-0.1.0 lib/generators/serializer/templates/serializer.rb