generated from ita-social-projects/DevTemplate
-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added sorting to users and calculators
- Loading branch information
1 parent
7913b62
commit 0ef8a09
Showing
11 changed files
with
83 additions
and
19 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 was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,32 @@ | ||
module Account::SortHelper | ||
def products_criterias | ||
[ | ||
[I18n.t("sort.id_asc"), "id asc"], | ||
[I18n.t("sort.id_desc"), "id desc"], | ||
[I18n.t("sort.title_asc"), "title asc"], | ||
[I18n.t("sort.title_desc"), "title desc"] | ||
] | ||
end | ||
|
||
def calculators_criterias | ||
[ | ||
[I18n.t("sort.id_asc"), "id asc"], | ||
[I18n.t("sort.id_desc"), "id desc"], | ||
[I18n.t("sort.name_asc"), "name asc"], | ||
[I18n.t("sort.name_desc"), "name desc"], | ||
[I18n.t("sort.slug_asc"), "slug asc"], | ||
[I18n.t("sort.slug_desc"), "slug desc"] | ||
] | ||
end | ||
|
||
def users_criterias | ||
[ | ||
[I18n.t("sort.id_asc"), "id asc"], | ||
[I18n.t("sort.id_desc"), "id desc"], | ||
[I18n.t("sort.email_asc"), "email asc"], | ||
[I18n.t("sort.email_desc"), "email desc"], | ||
[I18n.t("sort.last_sign_in_at_asc"), "last_sign_in_at asc"], | ||
[I18n.t("sort.last_sign_in_at_desc"), "last_sign_in_at desc"] | ||
] | ||
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
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