app/controllers/home_controller.rb
# The feed of everything going on with all students the educator has access
# to view.
The feed of everything going on with all students the educator has access
to view.
The feed of everything going on with all students the educator has access to view .
def feed_json
    view_as_educator = current_educator_or_doppleganger(params[:educator_id])
    time_now = time_now_or_param(params[:time_now])
    limit = params[:limit].to_i
    authorized_students = authorizer.authorized_when_viewing_as(view_as_educator) do
      Feed.students_for_feed(view_as_educator)
    end
    feed = Feed.new(authorized_students)
    feed_cards = feed.all_cards(time_now, limit)
    render json: {
      feed_cards: feed_cards
    }
  end
def feed_json view_as_educator = current_educator_or_doppleganger ( params [ :educator_id ] ) time_now = time_now_or_param ( params [ :time_now ] ) limit = params [ :limit ] . to_i authorized_students = authorizer . authorized_when_viewing_as ( view_as_educator ) do Feed . students_for_feed ( view_as_educator ) end feed = Feed . new ( authorized_students ) feed_cards = feed . all_cards ( time_now , limit ) render json : { feed_cards : feed_cards } end
The feed of everything going on with all students the educator has access
to view.
The feed of everything going on with all students the educator has access to view .