rosa-build/app/controllers/activity_feeds_controller.rb

12 lines
457 B
Ruby
Raw Normal View History

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
2012-03-15 17:52:54 +00:00
@activity_feeds = current_user.activity_feeds
@activity_feeds = @activity_feeds.where(:kind => "ActivityFeed::#{@filter.upcase}".constantize) unless @filter == :all
@activity_feeds = @activity_feeds.paginate :page => params[:page]
end
end