Merge branch 'develop' of 10.0.47.245:/home/trustie2 into develop
This commit is contained in:
commit
c9c5a18b41
|
@ -288,13 +288,13 @@ class ProjectsController < ApplicationController
|
||||||
when '0'
|
when '0'
|
||||||
@offset ||= @project_pages.reverse_offset
|
@offset ||= @project_pages.reverse_offset
|
||||||
unless @offset == 0
|
unless @offset == 0
|
||||||
@projects_status = @projects_status.offset(@offset).limit(@limit).all.reverse
|
@projects_status = @projects_status.includes(:projects).reorder('projects.created_on').offset(@offset).limit(@limit).all.reverse
|
||||||
else
|
else
|
||||||
limit = @project_count % @limit
|
limit = @project_count % @limit
|
||||||
if limit == 0
|
if limit == 0
|
||||||
limit = @limit
|
limit = @limit
|
||||||
end
|
end
|
||||||
@projects_status = @projects_status.offset(@offset).limit(limit).all.reverse
|
@projects_status = @projects_status.includes(:projects).reorder('projects.created_on').offset(@offset).limit(limit).all.reverse
|
||||||
end
|
end
|
||||||
@s_type = 0
|
@s_type = 0
|
||||||
# @projects = @projects.sort {|x,y| y.created_on <=> x.created_on }
|
# @projects = @projects.sort {|x,y| y.created_on <=> x.created_on }
|
||||||
|
@ -329,13 +329,13 @@ class ProjectsController < ApplicationController
|
||||||
else
|
else
|
||||||
@offset ||= @project_pages.reverse_offset
|
@offset ||= @project_pages.reverse_offset
|
||||||
unless @offset == 0
|
unless @offset == 0
|
||||||
@projects_status = @projects_status.offset(@offset).limit(@limit).all.reverse
|
@projects_status = @projects_status.includes(:projects).reorder('projects.created_on').offset(@offset).limit(@limit).all.reverse
|
||||||
else
|
else
|
||||||
limit = @project_count % @limit
|
limit = @project_count % @limit
|
||||||
if limit == 0
|
if limit == 0
|
||||||
limit = @limit
|
limit = @limit
|
||||||
end
|
end
|
||||||
@projects_status = @projects_status.offset(@offset).limit(limit).all.reverse
|
@projects_status = @projects_status.includes(:projects).reorder('projects.created_on').offset(@offset).limit(limit).all.reverse
|
||||||
end
|
end
|
||||||
@s_type = 0
|
@s_type = 0
|
||||||
# @projects = @projects.sort {|x,y| y.created_on <=> x.created_on }
|
# @projects = @projects.sort {|x,y| y.created_on <=> x.created_on }
|
||||||
|
|
Loading…
Reference in New Issue