Revert "Do not show announcement in json and rss if no title in I18n.locale (fix)"
This reverts commit f72697ae76.
			
			
This commit is contained in:
		
							parent
							
								
									e8a8e92f5c
								
							
						
					
					
						commit
						f76ead6ea5
					
				| 
						 | 
					@ -327,7 +327,6 @@ class Panel::Announcement::BackEnd::BulletinsController < OrbitBackendController
 | 
				
			||||||
  def get_bulletins
 | 
					  def get_bulletins
 | 
				
			||||||
    I18n.locale = params[:locale] || :zh_tw
 | 
					    I18n.locale = params[:locale] || :zh_tw
 | 
				
			||||||
    bulletins = params[:category_id] ? Bulletin.where(bulletin_category_id: params[:category_id]).order_by(:created_at, :desc) : Bulletin.all.order_by(:created_at, :desc)
 | 
					    bulletins = params[:category_id] ? Bulletin.where(bulletin_category_id: params[:category_id]).order_by(:created_at, :desc) : Bulletin.all.order_by(:created_at, :desc)
 | 
				
			||||||
    bulletins.reject!{|b| b.title_translations[I18n.locale.to_s].blank?}
 | 
					 | 
				
			||||||
    @bulletins = Kaminari.paginate_array(bulletins).page(params[:page]).per(params[:per] || 10)
 | 
					    @bulletins = Kaminari.paginate_array(bulletins).page(params[:page]).per(params[:per] || 10)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    respond_to do |format|
 | 
					    respond_to do |format|
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue