Skip to content

Commit

Permalink
Front page drafts sorted by language
Browse files Browse the repository at this point in the history
  • Loading branch information
ArturG committed Mar 17, 2013
1 parent a2c1557 commit 9c40008
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/pages_controller.rb
Expand Up @@ -8,7 +8,7 @@ def load(state)
collecting_started: true).
sort_by{|idea| [ idea.language == I18n.locale.to_s ? 1 : 0, idea.collecting_ended ? 0 : 1, (idea.signatures.where(state: "signed").count + idea.additional_signatures_count)]}.reverse
else
items = Idea.published.where(state: state).order("RANDOM()").includes(:votes).all
items = Idea.published.where(state: state).sort_by{|idea| [ idea.language == I18n.locale.to_s ? 1 : 0]}.reverse
end
item_counts = {}

Expand Down

0 comments on commit 9c40008

Please sign in to comment.