Add generators.

This seemed like the easiest place to start.
This commit is contained in:
Steve Klabnik
2014-07-05 12:35:29 -04:00
parent 0a81984ab5
commit 4fc0f679df
6 changed files with 111 additions and 1 deletions

View File

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