Module: TopicQueryParams
- Included in:
- CategoriesController, EmbedController, ListController, TagsController
- Defined in:
- lib/topic_query_params.rb
Instance Method Summary collapse
Instance Method Details
#build_topic_list_options ⇒ Object
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 |
# File 'lib/topic_query_params.rb', line 4 def = {} params[:tags] = [params[:tag_id], *Array(params[:tags])].uniq if params[:tag_id].present? TopicQuery..each do |key| if params.key?(key) && (val = params[key]).present? [key] = val raise Discourse::InvalidParameters.new key if !TopicQuery.validate?(key, val) end end # hacky columns get special handling [:topic_ids] = param_to_integer_list(:topic_ids) end |