fix for tag browse

This commit is contained in:
Kyle Drake 2017-04-05 04:06:07 -07:00
parent f9c885c23b
commit 0d2e2afb35

View file

@ -101,6 +101,7 @@ def browse_sites_dataset
site_dataset.where! ['sites.is_nsfw = ?', (params[:is_nsfw] == 'true' ? true : false)] site_dataset.where! ['sites.is_nsfw = ?', (params[:is_nsfw] == 'true' ? true : false)]
if params[:tag] if params[:tag]
site_dataset.select_all! :sites
site_dataset.inner_join! :sites_tags, :site_id => :id site_dataset.inner_join! :sites_tags, :site_id => :id
site_dataset.inner_join! :tags, :id => :sites_tags__tag_id site_dataset.inner_join! :tags, :id => :sites_tags__tag_id
site_dataset.where! ['tags.name = ?', params[:tag]] site_dataset.where! ['tags.name = ?', params[:tag]]