always sort by created_at on mobile

This commit is contained in:
danielgrippi 2011-09-19 23:50:13 -07:00
parent 8c586c4567
commit ab3d220b57

View file

@ -17,7 +17,7 @@ class AspectsController < ApplicationController
def index
aspect_ids = (params[:a_ids] ? params[:a_ids] : [])
@stream = AspectStream.new(current_user, aspect_ids,
:order => session[:sort_order],
:order => sort_order,
:max_time => params[:max_time].to_i)
if params[:only_posts]
@ -148,4 +148,8 @@ class AspectsController < ApplicationController
end
end
def sort_order
is_mobile_device? ? 'created_at' : session[:sort_order]
end
end