aboutsummaryrefslogtreecommitdiffstats
path: root/railties/generators/templates/controller.erb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/generators/templates/controller.erb')
-rw-r--r--railties/generators/templates/controller.erb19
1 files changed, 19 insertions, 0 deletions
diff --git a/railties/generators/templates/controller.erb b/railties/generators/templates/controller.erb
new file mode 100644
index 0000000000..600f5d2c59
--- /dev/null
+++ b/railties/generators/templates/controller.erb
@@ -0,0 +1,19 @@
+class <%= class_name %>Controller < AbstractApplicationController
+ helper :<%= file_name %>
+<% if options[:scaffold] -%>
+ model :<%= file_name %>
+ scaffold :<%= options[:scaffold] %>
+
+ <%- for action in actions -%>
+ #def <%= action %>
+ #end
+
+ <%- end -%>
+<% else -%>
+ <%- for action in actions -%>
+ def <%= action %>
+ end
+
+ <%- end -%>
+<% end -%>
+end