Skip to content

Commit

Permalink
CIが通るようにrubocop対応
Browse files Browse the repository at this point in the history
* rubocop
* ciはpushされたときのみ実行するようについででよくないが修正
  • Loading branch information
1021ky authored Nov 19, 2024
1 parent 5badc2c commit aa07803
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/rubyonrails.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
name: "Ruby on Rails CI"
on:
push:
pull_request:
branches: [ "main" ]
jobs:
test:
runs-on: ubuntu-latest
Expand Down
10 changes: 5 additions & 5 deletions app/controllers/api/users_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class UsersController < ApplicationController
# end

def show
id = get_user_params
id = user_get_params
user = XUser.find(id)
render json: user
end
Expand All @@ -24,12 +24,12 @@ def show

private

def get_user_params
def user_get_params
params.require(:id)
end

# def create_user_params
# params.require(:user).permit(:email, :name, :password)
# end
def create_user_params
params.require(:user).permit(:email, :name, :password)
end
end
end
1 change: 0 additions & 1 deletion spec/requests/users_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,3 @@
end
end
end
#

0 comments on commit aa07803

Please sign in to comment.