A platform for community discussion. Free, open, simple.
DEV: url_for on a String returns the string unchanged
Daniel Waterworth2989276c06e6
diff --git a/app/controllers/list_controller.rb b/app/controllers/list_controller.rbindex 66833a623fc..fad041f4b93 100644--- a/app/controllers/list_controller.rb+++ b/app/controllers/list_controller.rb@@ -147,8 +147,8 @@ class ListController < ApplicationControllerlist_opts = build_topic_list_optionstarget_user = fetch_user_from_params({ include_inactive: current_user.try(:staff?) || (current_user && SiteSetting.show_inactive_accounts) }, [:user_stat, :user_option])list = generate_list_for("topics_by", target_user, list_opts)- list.more_topics_url = url_for(construct_url_with(:next, list_opts))- list.prev_topics_url = url_for(construct_url_with(:prev, list_opts))+ list.more_topics_url = construct_url_with(:next, list_opts)+ list.prev_topics_url = construct_url_with(:prev, list_opts)respond_with_list(list)end@@ -160,8 +160,8 @@ class ListController < ApplicationControllerlist_opts = build_topic_list_optionslist = generate_list_for("group_topics", group, list_opts)- list.more_topics_url = url_for(construct_url_with(:next, list_opts))- list.prev_topics_url = url_for(construct_url_with(:prev, list_opts))+ list.more_topics_url = construct_url_with(:next, list_opts)+ list.prev_topics_url = construct_url_with(:prev, list_opts)respond_with_list(list)end@@ -172,8 +172,8 @@ class ListController < ApplicationControllerguardian.ensure_can_see_private_messages!(target_user.id)list = generate_list_for(action.to_s, target_user, list_opts)url_prefix = "topics"- list.more_topics_url = url_for(construct_url_with(:next, list_opts, url_prefix))- list.prev_topics_url = url_for(construct_url_with(:prev, list_opts, url_prefix))+ list.more_topics_url = construct_url_with(:next, list_opts, url_prefix)+ list.prev_topics_url = construct_url_with(:prev, list_opts, url_prefix)respond_with_list(list)endend