mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: url_for on a String returns the string unchanged
...which makes it quite unnecessary.
This commit is contained in:
parent
417be323a2
commit
2989276c06
@ -147,8 +147,8 @@ class ListController < ApplicationController
|
|||||||
list_opts = build_topic_list_options
|
list_opts = build_topic_list_options
|
||||||
target_user = fetch_user_from_params({ include_inactive: current_user.try(:staff?) || (current_user && SiteSetting.show_inactive_accounts) }, [:user_stat, :user_option])
|
target_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 = generate_list_for("topics_by", target_user, list_opts)
|
||||||
list.more_topics_url = url_for(construct_url_with(:next, list_opts))
|
list.more_topics_url = construct_url_with(:next, list_opts)
|
||||||
list.prev_topics_url = url_for(construct_url_with(:prev, list_opts))
|
list.prev_topics_url = construct_url_with(:prev, list_opts)
|
||||||
respond_with_list(list)
|
respond_with_list(list)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -160,8 +160,8 @@ class ListController < ApplicationController
|
|||||||
|
|
||||||
list_opts = build_topic_list_options
|
list_opts = build_topic_list_options
|
||||||
list = generate_list_for("group_topics", group, list_opts)
|
list = generate_list_for("group_topics", group, list_opts)
|
||||||
list.more_topics_url = url_for(construct_url_with(:next, list_opts))
|
list.more_topics_url = construct_url_with(:next, list_opts)
|
||||||
list.prev_topics_url = url_for(construct_url_with(:prev, list_opts))
|
list.prev_topics_url = construct_url_with(:prev, list_opts)
|
||||||
respond_with_list(list)
|
respond_with_list(list)
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -172,8 +172,8 @@ class ListController < ApplicationController
|
|||||||
guardian.ensure_can_see_private_messages!(target_user.id)
|
guardian.ensure_can_see_private_messages!(target_user.id)
|
||||||
list = generate_list_for(action.to_s, target_user, list_opts)
|
list = generate_list_for(action.to_s, target_user, list_opts)
|
||||||
url_prefix = "topics"
|
url_prefix = "topics"
|
||||||
list.more_topics_url = url_for(construct_url_with(:next, list_opts, url_prefix))
|
list.more_topics_url = construct_url_with(:next, list_opts, url_prefix)
|
||||||
list.prev_topics_url = url_for(construct_url_with(:prev, list_opts, url_prefix))
|
list.prev_topics_url = construct_url_with(:prev, list_opts, url_prefix)
|
||||||
respond_with_list(list)
|
respond_with_list(list)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user