Skip to content

Commit c033501

Browse files
author
David Heinemeier Hansson
committed
Generate symbols, not strings, for the filtering of before_action
1 parent 153656d commit c033501

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/generators/rails/templates/api_controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<% end -%>
55
<% module_namespacing do -%>
66
class <%= controller_class_name %>Controller < ApplicationController
7-
before_action :set_<%= singular_table_name %>, only: %w[ show update destroy ]
7+
before_action :set_<%= singular_table_name %>, only: %i[ show update destroy ]
88
99
# GET <%= route_url %>
1010
# GET <%= route_url %>.json

lib/generators/rails/templates/controller.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<% end -%>
55
<% module_namespacing do -%>
66
class <%= controller_class_name %>Controller < ApplicationController
7-
before_action :set_<%= singular_table_name %>, only: %w[ show edit update destroy ]
7+
before_action :set_<%= singular_table_name %>, only: %i[ show edit update destroy ]
88
99
# GET <%= route_url %>
1010
# GET <%= route_url %>.json

0 commit comments

Comments
 (0)