Add ActionController template
This commit is contained in:
parent
93e19cb962
commit
715ffcd5be
1 changed files with 16 additions and 0 deletions
16
lib/templates/rails/controller/controller.rb.tt
Normal file
16
lib/templates/rails/controller/controller.rb.tt
Normal file
|
@ -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 -%>
|
Loading…
Reference in a new issue