Permalink
Browse files

restul redirect for session

  • Loading branch information...
1 parent 4ae0927 commit 384604591fc03ab6d1acadbd7f095b45a9ad2781 @mck- committed Mar 9, 2012
Showing with 2 additions and 3 deletions.
  1. +2 −3 app/controllers/movies_controller.rb
@@ -16,13 +16,12 @@ def index
@movies = Movie.where(:rating => params[:ratings].keys)
else
if session[:ratings]
- @checked_ratings = session[:ratings]
- @movies = Movie.where(:rating => session[:ratings].keys)
+ redirect_to(movies_path({:ratings => session[:ratings]}))
elsif
@movies = Movie.all
end
end
-
+
if params[:sort] == "title"
@movies = @movies.sort_by {|m| m.title}
elsif params[:sort] == "date"

0 comments on commit 3846045

Please sign in to comment.