From 715ffcd5bed972ea334da4f408fdedc6220ddfd0 Mon Sep 17 00:00:00 2001 From: Eric Date: Fri, 1 May 2020 12:24:56 -0500 Subject: [PATCH] Add ActionController template --- lib/templates/rails/controller/controller.rb.tt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 lib/templates/rails/controller/controller.rb.tt diff --git a/lib/templates/rails/controller/controller.rb.tt b/lib/templates/rails/controller/controller.rb.tt new file mode 100644 index 00000000..b5bd889c --- /dev/null +++ b/lib/templates/rails/controller/controller.rb.tt @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +# License: AGPL-3.0-or-later WITH Web-Template-Output-Additional-Permission-3.0-or-later +<% 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 -%>