Skip to content

Commit

Permalink
Remove session[:a_ids] .
Browse files Browse the repository at this point in the history
  • Loading branch information
Pistos committed Feb 27, 2012
1 parent 609b06d commit 18a2434
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions app/controllers/aspects_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class AspectsController < ApplicationController
respond_to :json, :only => [:show, :create]

def index
aspect_ids = (session[:a_ids] ? session[:a_ids] : [])
aspect_ids = current_user.aspects.where(:selected => true)
@stream = Stream::Aspect.new(current_user, aspect_ids,
:order => sort_order,
:max_time => params[:max_time].to_i)
Expand Down Expand Up @@ -139,8 +139,7 @@ def ensure_page
private

def save_selected_aspects
if params[:a_ids].present?
session[:a_ids] = params[:a_ids]
if params['a_ids'].present?
a_ids = params['a_ids'].map(&:to_i)
current_user.aspects.each do |a|
a.selected = a_ids.include?(a.id)
Expand Down

0 comments on commit 18a2434

Please sign in to comment.