diff options
author | mhasbini <mohammad.hasbini@gmail.com> | 2017-02-21 22:21:49 +0300 |
---|---|---|
committer | mhasbini <mohammad.hasbini@gmail.com> | 2017-02-21 22:21:49 +0300 |
commit | 0a53a3d9664187cbd8c72c24666a8ff03f3dccec (patch) | |
tree | a3bf55f0d7403ed662a09a413b23f876587deebe /app/controllers/dashboard/todos_controller.rb | |
parent | 881529495379505542033bf7fb0d91cdc5b51e8d (diff) |
change todos counter position & format ( for large counts )
Diffstat (limited to 'app/controllers/dashboard/todos_controller.rb')
-rw-r--r-- | app/controllers/dashboard/todos_controller.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/app/controllers/dashboard/todos_controller.rb b/app/controllers/dashboard/todos_controller.rb index 4e61b0886d8..ee2358b986d 100644 --- a/app/controllers/dashboard/todos_controller.rb +++ b/app/controllers/dashboard/todos_controller.rb @@ -35,6 +35,11 @@ class Dashboard::TodosController < Dashboard::ApplicationController render json: todos_counts end + # Used in TodosHelper also + def self.todos_count_format(count) + count >= 100 ? '99+' : count + end + private def find_todos |