diff --git a/app/controllers/accounts/join_codes_controller.rb b/app/controllers/accounts/join_codes_controller.rb index 8123cea05..b33a83486 100644 --- a/app/controllers/accounts/join_codes_controller.rb +++ b/app/controllers/accounts/join_codes_controller.rb @@ -12,7 +12,7 @@ class Accounts::JoinCodesController < ApplicationController private def qr_code_svg - join_url(Current.account.join_code).then do |url| + join_path(Current.account.join_code).then do |url| RQRCode::QRCode.new(url).as_svg(viewbox: true, fill: :white, color: :black) end end diff --git a/app/controllers/accounts/users_controller.rb b/app/controllers/accounts/users_controller.rb index 280409c0b..e3bdf4c54 100644 --- a/app/controllers/accounts/users_controller.rb +++ b/app/controllers/accounts/users_controller.rb @@ -8,7 +8,7 @@ class Accounts::UsersController < ApplicationController def destroy @user.deactivate - redirect_to users_url + redirect_to users_path end private diff --git a/app/controllers/assignments_controller.rb b/app/controllers/assignments_controller.rb index 9e5cd62c1..6e6fd3477 100644 --- a/app/controllers/assignments_controller.rb +++ b/app/controllers/assignments_controller.rb @@ -3,7 +3,7 @@ class AssignmentsController < ApplicationController def create @bubble.assign(find_assignee) - redirect_to bucket_bubble_url(@bucket, @bubble) + redirect_to bucket_bubble_path(@bucket, @bubble) end private diff --git a/app/controllers/bubbles/images_controller.rb b/app/controllers/bubbles/images_controller.rb index 5342dfcf1..ae73bde3c 100644 --- a/app/controllers/bubbles/images_controller.rb +++ b/app/controllers/bubbles/images_controller.rb @@ -3,6 +3,6 @@ class Bubbles::ImagesController < ApplicationController def destroy @bubble.image.purge_later - redirect_to bucket_bubble_url(@bubble.bucket, @bubble) + redirect_to bucket_bubble_path(@bubble.bucket, @bubble) end end diff --git a/app/controllers/bubbles/pops_controller.rb b/app/controllers/bubbles/pops_controller.rb index ae01daf3f..6a780823b 100644 --- a/app/controllers/bubbles/pops_controller.rb +++ b/app/controllers/bubbles/pops_controller.rb @@ -3,11 +3,11 @@ class Bubbles::PopsController < ApplicationController def create @bubble.pop! - redirect_to bucket_bubble_url(@bubble.bucket, @bubble) + redirect_to bucket_bubble_path(@bubble.bucket, @bubble) end def destroy @bubble.unpop - redirect_to bucket_bubble_url(@bubble.bucket, @bubble) + redirect_to bucket_bubble_path(@bubble.bucket, @bubble) end end diff --git a/app/controllers/bubbles_controller.rb b/app/controllers/bubbles_controller.rb index f65380c9a..95da3f6d9 100644 --- a/app/controllers/bubbles_controller.rb +++ b/app/controllers/bubbles_controller.rb @@ -15,7 +15,7 @@ class BubblesController < ApplicationController def create @bubble = @bucket.bubbles.create! - redirect_to bucket_bubble_url(@bucket, @bubble) + redirect_to bucket_bubble_path(@bucket, @bubble) end def show @@ -27,7 +27,7 @@ class BubblesController < ApplicationController def update @bubble.update! bubble_params - redirect_to bucket_bubble_url(@bucket, @bubble) + redirect_to bucket_bubble_path(@bucket, @bubble) end private diff --git a/app/controllers/buckets_controller.rb b/app/controllers/buckets_controller.rb index b6d0eed8b..229e5a58c 100644 --- a/app/controllers/buckets_controller.rb +++ b/app/controllers/buckets_controller.rb @@ -11,7 +11,7 @@ class BucketsController < ApplicationController def create @bucket = Current.account.buckets.create! bucket_params - redirect_to bucket_bubbles_url(@bucket) + redirect_to bucket_bubbles_path(@bucket) end def edit @@ -25,12 +25,12 @@ class BucketsController < ApplicationController @bucket.accesses.revise granted: grantees, revoked: revokees end - redirect_to bucket_bubbles_url(@bucket) + redirect_to bucket_bubbles_path(@bucket) end def destroy @bucket.destroy - redirect_to buckets_url + redirect_to buckets_path end private diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb index fda9ad09f..42bef3a2e 100644 --- a/app/controllers/comments_controller.rb +++ b/app/controllers/comments_controller.rb @@ -3,6 +3,6 @@ class CommentsController < ApplicationController def create @bubble.comment! params.expect(comment: [ :body ]) - redirect_to bucket_bubble_url(@bucket, @bubble) + redirect_to bucket_bubble_path(@bucket, @bubble) end end diff --git a/app/controllers/first_runs_controller.rb b/app/controllers/first_runs_controller.rb index 3c1b011b2..6b59db593 100644 --- a/app/controllers/first_runs_controller.rb +++ b/app/controllers/first_runs_controller.rb @@ -9,12 +9,12 @@ class FirstRunsController < ApplicationController def create user = FirstRun.create!(user_params) start_new_session_for user - redirect_to root_url + redirect_to root_path end private def prevent_repeats - redirect_to root_url unless Account.none? + redirect_to root_path unless Account.none? end def user_params diff --git a/app/controllers/sessions_controller.rb b/app/controllers/sessions_controller.rb index 357e70a98..f853b499c 100644 --- a/app/controllers/sessions_controller.rb +++ b/app/controllers/sessions_controller.rb @@ -1,6 +1,6 @@ class SessionsController < ApplicationController allow_unauthenticated_access only: %i[ new create ] - rate_limit to: 10, within: 3.minutes, only: :create, with: -> { redirect_to new_session_url, alert: "Try again later." } + rate_limit to: 10, within: 3.minutes, only: :create, with: -> { redirect_to new_session_path, alert: "Try again later." } before_action :require_first_run_completion @@ -10,19 +10,19 @@ class SessionsController < ApplicationController def create if user = User.active.authenticate_by(params.permit(:email_address, :password)) start_new_session_for user - redirect_to after_authentication_url + redirect_to after_authentication_path else - redirect_to new_session_url, alert: "Try another email address or password." + redirect_to new_session_path, alert: "Try another email address or password." end end def destroy terminate_session - redirect_to new_session_url + redirect_to new_session_path end private def require_first_run_completion - redirect_to first_run_url if Account.none? + redirect_to first_run_path if Account.none? end end diff --git a/app/controllers/tags_controller.rb b/app/controllers/tags_controller.rb index e54db6bac..e389121b2 100644 --- a/app/controllers/tags_controller.rb +++ b/app/controllers/tags_controller.rb @@ -13,7 +13,7 @@ class TagsController < ApplicationController def create @bubble.tags << Current.account.tags.find_or_create_by!(tag_params) - redirect_to bucket_bubble_url(@bucket, @bubble) + redirect_to bucket_bubble_path(@bucket, @bubble) end def destroy diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index b2608bfc8..c0c9dbc9a 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -10,7 +10,7 @@ class UsersController < ApplicationController def create user = @account.users.create!(user_params) start_new_session_for user - redirect_to root_url + redirect_to root_path end private