lib/controllers/features.rb in wackamole-0.0.3 vs lib/controllers/features.rb in wackamole-0.0.4

- old
+ new

@@ -3,10 +3,12 @@ # --------------------------------------------------------------------------- # paginate top features get "/features/:page" do page = params[:page] ? params[:page].to_i : 1 +puts @filter.inspect + @features = Wackamole::Feature.paginate_tops( @filter.to_conds, page ) @search_path = "/features/search" @filter_path = "/features/filter" if request.xhr? @@ -33,9 +35,11 @@ # --------------------------------------------------------------------------- # Filter post "/features/filter" do @filter.from_options( params[:filter] ) + session[:filter] = @filter +puts "Setting #{session[:filter].inspect}" @features = Wackamole::Feature.paginate_tops( @filter.to_conds ) erb :"features/filter.js", :layout => false end end \ No newline at end of file