Fix public tags page
This commit is contained in:
		
							parent
							
								
									00e9dac1d3
								
							
						
					
					
						commit
						d236dcded2
					
				
					 2 changed files with 6 additions and 3 deletions
				
			
		| 
						 | 
					@ -4,7 +4,8 @@ class TagsController < ApplicationController
 | 
				
			||||||
  layout 'public'
 | 
					  layout 'public'
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  def show
 | 
					  def show
 | 
				
			||||||
    @statuses = Tag.find_by!(name: params[:id].downcase).statuses.order('id desc').paginate_by_max_id(20, params[:max_id] || nil)
 | 
					    @tag      = Tag.find_by!(name: params[:id].downcase)
 | 
				
			||||||
  	@statuses = cache_collection(@statuses, Status)
 | 
					    @statuses = @tag.statuses.order('id desc').paginate_by_max_id(20, params[:max_id])
 | 
				
			||||||
 | 
					    @statuses = cache_collection(@statuses, Status)
 | 
				
			||||||
  end
 | 
					  end
 | 
				
			||||||
end
 | 
					end
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -5,4 +5,6 @@
 | 
				
			||||||
  .activity-stream
 | 
					  .activity-stream
 | 
				
			||||||
    = render partial: 'stream_entries/status', collection: @statuses, as: :status, cached: true
 | 
					    = render partial: 'stream_entries/status', collection: @statuses, as: :status, cached: true
 | 
				
			||||||
 | 
					
 | 
				
			||||||
= id_paginate tag_path, 20, @statuses
 | 
					.pagination
 | 
				
			||||||
 | 
					  - if @statuses.size == 20
 | 
				
			||||||
 | 
					    = link_to safe_join([t('pagination.next'), fa_icon('chevron-right')], ' '), tag_url(@tag, max_id: @statuses.last.id), class: 'next_page', rel: 'next'
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		
		Reference in a new issue