Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ GEM
coderay (1.1.3)
coercible (1.0.0)
descendants_tracker (~> 0.0.1)
concurrent-ruby (1.3.4)
concurrent-ruby (1.3.5)
connection_pool (2.5.0)
coveralls_reborn (0.28.0)
simplecov (~> 0.22.0)
Expand Down Expand Up @@ -164,7 +164,7 @@ GEM
csv
mini_mime (>= 1.0.0)
multi_xml (>= 0.5.2)
i18n (1.14.6)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
ice_nine (0.11.2)
io-console (0.8.0)
Expand Down Expand Up @@ -201,12 +201,12 @@ GEM
net-smtp (0.5.0)
net-protocol
nio4r (2.7.4)
nokogiri (1.18.1)
nokogiri (1.18.2)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
ostruct (0.6.1)
parallel (1.26.3)
parser (3.3.6.0)
parser (3.3.7.0)
ast (~> 2.4.1)
racc
pg (1.5.9)
Expand All @@ -216,7 +216,7 @@ GEM
pry-byebug (3.10.1)
byebug (~> 11.0)
pry (>= 0.13, < 0.15)
psych (5.2.2)
psych (5.2.3)
date
stringio
public_suffix (6.0.1)
Expand Down Expand Up @@ -268,7 +268,7 @@ GEM
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rdoc (6.10.0)
rdoc (6.11.0)
psych (>= 4.0.0)
regexp_parser (2.10.0)
reline (0.6.0)
Expand Down Expand Up @@ -311,7 +311,7 @@ GEM
rubocop (~> 1.41)
rubocop-factory_bot (2.26.1)
rubocop (~> 1.61)
rubocop-rails (2.28.0)
rubocop-rails (2.29.0)
activesupport (>= 4.2.0)
rack (>= 1.1)
rubocop (>= 1.52.0, < 2.0)
Expand Down Expand Up @@ -350,7 +350,7 @@ GEM
activesupport (>= 6.1)
sprockets (>= 3.0.0)
stringio (3.1.2)
stripe (13.3.0)
stripe (13.3.1)
sync (0.5.0)
term-ansicolor (1.11.2)
tins (~> 1.0)
Expand All @@ -365,7 +365,7 @@ GEM
concurrent-ruby (~> 1.0)
uglifier (4.2.1)
execjs (>= 0.3.0, < 3)
unicode-display_width (3.1.3)
unicode-display_width (3.1.4)
unicode-emoji (~> 4.0, >= 4.0.4)
unicode-emoji (4.0.4)
uri (1.0.2)
Expand Down
16 changes: 10 additions & 6 deletions app/controllers/passwords_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,18 @@ def check_signups_enabled
end

def password_params
params.require(:user)
.permit(:password_challenge, :password, :password_confirmation)
params
.expect(user: [
:password_challenge,
:password,
:password_confirmation
])
end

def user_params
params.require(:user)
.permit(:username, :password, :password_confirmation)
.merge(admin: User.none?)
.to_h.symbolize_keys
params
.expect(user: [:username, :password, :password_confirmation])
.merge(admin: User.none?)
.to_h.symbolize_keys
end
end
2 changes: 1 addition & 1 deletion app/controllers/profiles_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ def update
private

def user_params
params.require(:user).permit(:username, :password_challenge, :stories_order)
params.expect(user: [:username, :password_challenge, :stories_order])
end
end
2 changes: 1 addition & 1 deletion app/controllers/settings_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@ def update
private

def setting_params
params.require(:setting).permit(:enabled)
params.expect(setting: [:enabled])
end
end
Loading