aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails_generator/generators/components/controller/templates/controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'railties/lib/rails_generator/generators/components/controller/templates/controller.rb')
-rw-r--r--railties/lib/rails_generator/generators/components/controller/templates/controller.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/railties/lib/rails_generator/generators/components/controller/templates/controller.rb b/railties/lib/rails_generator/generators/components/controller/templates/controller.rb
new file mode 100644
index 0000000000..da71b5f057
--- /dev/null
+++ b/railties/lib/rails_generator/generators/components/controller/templates/controller.rb
@@ -0,0 +1,10 @@
+class <%= class_name %>Controller < ApplicationController
+<% if options[:scaffold] -%>
+ scaffold :<%= singular_name %>
+<% end -%>
+<% for action in actions -%>
+
+ def <%= action %>
+ end
+<% end -%>
+end