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:
@@ -11,7 +11,7 @@ class UploadService
|
||||
end
|
||||
|
||||
def comment_replacement_message(post, replacement)
|
||||
%("#{replacement.creator.name}":[/users/#{replacement.creator.id}] replaced this post with a new image:\n\n#{replacement_message(post, replacement)})
|
||||
%("#{replacement.creator.name}":[#{Routes.user_path(replacement.creator)}] replaced this post with a new image:\n\n#{replacement_message(post, replacement)})
|
||||
end
|
||||
|
||||
def replacement_message(post, replacement)
|
||||
|
||||
Reference in New Issue
Block a user