Skip to content

Commit

Permalink
Update admin_controller.rb (#11531)
Browse files Browse the repository at this point in the history
* Update admin_controller.rb

* Update app/controllers/admin_controller.rb

Co-authored-by: Tilda Udufo <mathildaudufo@gmail.com>

* Update app/controllers/admin_controller.rb

Co-authored-by: Tilda Udufo <mathildaudufo@gmail.com>

* Update app/controllers/admin_controller.rb

Co-authored-by: Tilda Udufo <mathildaudufo@gmail.com>

* Update app/controllers/admin_controller.rb

Co-authored-by: Tilda Udufo <mathildaudufo@gmail.com>

* Update app/controllers/admin_controller.rb

Co-authored-by: Tilda Udufo <mathildaudufo@gmail.com>

* Update app/controllers/admin_controller.rb

Co-authored-by: Tilda Udufo <mathildaudufo@gmail.com>

Co-authored-by: Tilda Udufo <mathildaudufo@gmail.com>
  • Loading branch information
Ceejaycodez and TildaDares committed Oct 22, 2022
1 parent a5aecc3 commit a7f8199
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions app/controllers/admin_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def promote_admin
flash[:error] = 'Only admins can promote other users to admins.'
end
end
redirect_to '/profile/' + @user.username + '?_=' + Time.now.to_i.to_s
redirect_to "/profile/#{@user.username}?_=#{Time.now.to_i}"
end

def promote_moderator
Expand All @@ -29,7 +29,7 @@ def promote_moderator
flash[:error] = 'Only moderators can promote other users.'
end
end
redirect_to '/profile/' + @user.username + '?_=' + Time.now.to_i.to_s
redirect_to "/profile/#{@user.username}?_=#{Time.now.to_i}"
end

def demote_basic
Expand All @@ -43,7 +43,7 @@ def demote_basic
flash[:error] = 'Only admins and moderators can demote other users.'
end
end
redirect_to '/profile/' + @user.username + '?_=' + Time.now.to_i.to_s
redirect_to "/profile/#{@user.username}?_=#{Time.now.to_i}"
end

def reset_user_password
Expand Down Expand Up @@ -280,7 +280,7 @@ def moderate
else
flash[:error] = 'Only moderators can moderate other users.'
end
redirect_to '/profile/' + user.name + '?_=' + Time.now.to_i.to_s
redirect_to "/profile/#{user.name}?_=#{Time.now.to_i}"
end

def unmoderate
Expand All @@ -291,7 +291,7 @@ def unmoderate
else
flash[:error] = 'Only moderators can unmoderate other users.'
end
redirect_to '/profile/' + user.name + '?_=' + Time.now.to_i.to_s
redirect_to "/profile/#{user.name}?_=#{Time.now.to_i}"
end

def ban
Expand All @@ -301,7 +301,7 @@ def ban
else
flash[:error] = 'Only moderators can ban other users.'
end
redirect_to '/profile/' + user.name + '?_=' + Time.now.to_i.to_s
redirect_to "/profile/#{user.name}?_=#{Time.now.to_i}"
end

def unban
Expand All @@ -312,7 +312,7 @@ def unban
else
flash[:error] = 'Only moderators can unban other users.'
end
redirect_to '/profile/' + user.name + '?_=' + Time.now.to_i.to_s
redirect_to "/profile/#{user.name}?_=#{Time.now.to_i}"
end

def users
Expand Down Expand Up @@ -359,7 +359,7 @@ def migrate
else
flash[:error] = 'Only admins can migrate users.'
end
redirect_to '/profile/' + du.name
redirect_to "/profile/#{du.name}"
end

def queue
Expand Down

0 comments on commit a7f8199

Please sign in to comment.