diff --git a/lib/generators/rails/templates/api_controller.rb b/lib/generators/rails/templates/api_controller.rb index 1b37fcb..c41c744 100644 --- a/lib/generators/rails/templates/api_controller.rb +++ b/lib/generators/rails/templates/api_controller.rb @@ -4,7 +4,7 @@ <% end -%> <% module_namespacing do -%> class <%= controller_class_name %>Controller < ApplicationController - before_action :set_<%= singular_table_name %>, only: %w[ show update destroy ] + before_action :set_<%= singular_table_name %>, only: %i[ show update destroy ] # GET <%= route_url %> # GET <%= route_url %>.json diff --git a/lib/generators/rails/templates/controller.rb b/lib/generators/rails/templates/controller.rb index f013b3e..5f5eee7 100644 --- a/lib/generators/rails/templates/controller.rb +++ b/lib/generators/rails/templates/controller.rb @@ -4,7 +4,7 @@ <% end -%> <% module_namespacing do -%> class <%= controller_class_name %>Controller < ApplicationController - before_action :set_<%= singular_table_name %>, only: %w[ show edit update destroy ] + before_action :set_<%= singular_table_name %>, only: %i[ show edit update destroy ] # GET <%= route_url %> # GET <%= route_url %>.json