Skip to content

Commit bfea25b

Browse files
Fixes rubocop offences for controllers
1 parent 19ec5fd commit bfea25b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/generators/rest_api_generator/templates/child_api_controller.rb.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
class <%= class_name.pluralize %>Controller < ApplicationController
22
before_action :set_<%= options['scope'].downcase %>
3-
before_action :set_<%= singular_name %>, only: %i[ show update destroy ]
3+
before_action :set_<%= singular_name %>, only: %i[show update destroy]
44

55
def index
66
@<%= plural_name %> = @<%= options['scope'].downcase %>.<%= plural_name %>

lib/generators/rest_api_generator/templates/rest_api_controller.rb.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class <%= class_name.pluralize %>Controller < ApplicationController
2-
before_action :set_<%= singular_name %>, only: %i[ show update destroy ]
2+
before_action :set_<%= singular_name %>, only: %i[show update destroy]
33

44
def index
55
@<%= singular_name %> = <%= class_name %>.all

0 commit comments

Comments
 (0)