rosa-build/app/controllers/activity_feeds_controller.rb

16 lines
625 B
Ruby
Raw Normal View History

# -*- encoding : utf-8 -*-
class ActivityFeedsController < ApplicationController
before_filter :authenticate_user!
def index
2012-03-16 15:37:58 +00:00
@filter = t('feed_menu').has_key?(params[:filter].try(:to_sym)) ? params[:filter].to_sym : :all
@activity_feeds = current_user.activity_feeds
2012-03-15 17:52:54 +00:00
@activity_feeds = @activity_feeds.where(:kind => "ActivityFeed::#{@filter.upcase}".constantize) unless @filter == :all
@activity_feeds = @activity_feeds.paginate :page => params[:page]
2012-04-17 16:01:35 +01:00
respond_to do |format|
format.html { request.xhr? ? render('_list', :layout => false) : render('index') }
format.atom
2012-03-21 10:25:30 +00:00
end
end
end