forked from thoughtbot/sortable_table
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cleaner tests, adding documentation for all the overrride options
- Loading branch information
Dan Croak
committed
Jan 2, 2009
1 parent
c1fc242
commit 8f86f51
Showing
9 changed files
with
129 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,18 @@ | ||
class UsersController < ApplicationController | ||
|
||
sortable_attributes :name, | ||
:age, | ||
:email, | ||
:group => "groups.name", | ||
sortable_attributes :name, :age, :email, :group => "groups.name", | ||
:age_and_name => ["age", "users.name"] | ||
|
||
def index | ||
@users = User.find :all, :order => sort_order("ascending") | ||
@users_dupe = @users | ||
@users = User.find :all, :order => sort_order("ascending") | ||
end | ||
|
||
def show | ||
@users = User.find :all, :order => sort_order | ||
end | ||
|
||
def members | ||
@members = User.find :all, :order => sort_order | ||
end | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Empty file.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters