Skip to content
This repository has been archived by the owner on May 18, 2021. It is now read-only.

Commit

Permalink
fix participants page
Browse files Browse the repository at this point in the history
  • Loading branch information
PanfilovDenis committed Feb 13, 2013
1 parent 5ae103d commit 78fe13c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/controllers/web/users_controller.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
class Web::UsersController < Web::ApplicationController

def index
@users = User.shown_as_participants
@users = User.shown_as_participants.alphabetically
end

def new
Expand Down
2 changes: 2 additions & 0 deletions app/repositories/user_repository.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ module UserRepository
scope :shown_as_participants, -> {
where show_as_participant: true
}

scope :alphabetically, -> { order("first_name, last_name ASC") }
end

end
2 changes: 1 addition & 1 deletion app/views/layouts/web/shared/_navigation.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
%li= link_to t(".news"), news_index_path
%li= link_to t(".routes"), page_path(:routes)
%li= link_to t(".contacts"), page_path(:contacts)
%li= link_to t(".afterpaty"), page_path(:afterpaty)
/ %li= link_to t(".afterpaty"), page_path(:afterpaty)
- if signed_as_admin?
%li= link_to t(".admin"), admin_root_path
Expand Down
2 changes: 1 addition & 1 deletion config/locales/ru.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ ru:
shared:
navigation:
title: 'Стачка!'
participants: 'Кто идёт?'
participants: 'Участники'
logout: 'Выйти'
admin: 'Админка'
i_will_go: 'Я пойду'
Expand Down

0 comments on commit 78fe13c

Please sign in to comment.