routes: replace hardcoded routes in models with route helpers.

Add a Routes module that gives models access to route helpers outside of
views, and use it to replace various hardcoded routes.
This commit is contained in:
evazion
2020-12-23 13:19:03 -06:00
parent a947a10c53
commit dbb66ace90
13 changed files with 34 additions and 21 deletions

View File

@@ -7,7 +7,7 @@ class UserFeedbackTest < ActiveSupport::TestCase
gold = FactoryBot.create(:gold_user)
member = FactoryBot.create(:user)
dmail = <<~EOS.chomp
@#{gold.name} created a "positive record":/user_feedbacks?search[user_id]=#{user.id} for your account:
@#{gold.name} created a "positive record":/user_feedbacks?search%5Buser_id%5D=#{user.id} for your account:
good job!
EOS