aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails/generators/rails/controller/templates/controller.rb.tt
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails/generators/rails/controller/templates/controller.rb.tt')
-rw-r--r--railties/lib/rails/generators/rails/controller/templates/controller.rb.tt13
1 files changed, 13 insertions, 0 deletions
diff --git a/railties/lib/rails/generators/rails/controller/templates/controller.rb.tt b/railties/lib/rails/generators/rails/controller/templates/controller.rb.tt
new file mode 100644
index 0000000000..633e0b3177
--- /dev/null
+++ b/railties/lib/rails/generators/rails/controller/templates/controller.rb.tt
@@ -0,0 +1,13 @@
+<% if namespaced? -%>
+require_dependency "<%= namespaced_path %>/application_controller"
+
+<% end -%>
+<% module_namespacing do -%>
+class <%= class_name %>Controller < ApplicationController
+<% actions.each do |action| -%>
+ def <%= action %>
+ end
+<%= "\n" unless action == actions.last -%>
+<% end -%>
+end
+<% end -%>