Sha256: a572a76bfc83a13abea14554662dce34ae2ea3f9f823d70868bac0aa0fb7fc3a

Contents?: true

Size: 252 Bytes

Versions: 60

Compression:

Stored size: 252 Bytes

Contents

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

Version data entries

60 entries across 60 versions & 4 rubygems

Version Path
active_model_serializers-0.10.15 lib/generators/rails/templates/serializer.rb.erb
active_model_serializers-0.9.13 lib/active_model/serializer/generators/serializer/templates/serializer.rb
active_model_serializers-0.9.12 lib/active_model/serializer/generators/serializer/templates/serializer.rb
active_model_serializers-0.9.11 lib/active_model/serializer/generators/serializer/templates/serializer.rb
active_model_serializers-0.10.14 lib/generators/rails/templates/serializer.rb.erb
active_model_serializers-0.9.9 lib/active_model/serializer/generators/serializer/templates/serializer.rb
active_model_serializers-0.10.13 lib/generators/rails/templates/serializer.rb.erb
active_model_serializers-0.9.8 lib/active_model/serializer/generators/serializer/templates/serializer.rb
active_model_serializers-0.10.12 lib/generators/rails/templates/serializer.rb.erb
active_model_serializers-0.10.11 lib/generators/rails/templates/serializer.rb.erb
active_model_serializers-0.10.10 lib/generators/rails/templates/serializer.rb.erb
active_model_serializers_custom-0.10.90 lib/generators/rails/templates/serializer.rb.erb
active_model_serializers-0.10.9 lib/generators/rails/templates/serializer.rb.erb
active_model_serializers-0.10.8 lib/generators/rails/templates/serializer.rb.erb
active_model_serializers-0.10.7 lib/generators/rails/templates/serializer.rb.erb
active_model_serializers-0.9.7 lib/active_model/serializer/generators/serializer/templates/serializer.rb
active_model_serializers-0.10.6 lib/generators/rails/templates/serializer.rb.erb
active_model_serializers-0.10.5 lib/generators/rails/templates/serializer.rb.erb
active_model_serializers-0.9.6 lib/active_model/serializer/generators/serializer/templates/serializer.rb
active_model_serializers-0.10.4 lib/generators/rails/templates/serializer.rb.erb