Use number_with_delimiter for Todos pending/done tab counts
This commit is contained in:
parent
bd7d612452
commit
0ec6981586
|
@ -9,14 +9,14 @@
|
||||||
%span
|
%span
|
||||||
To do
|
To do
|
||||||
%span.badge
|
%span.badge
|
||||||
= todos_pending_count
|
= number_with_delimiter(todos_pending_count)
|
||||||
- todo_done_active = ('active' if params[:state] == 'done')
|
- todo_done_active = ('active' if params[:state] == 'done')
|
||||||
%li{class: "todos-done #{todo_done_active}"}
|
%li{class: "todos-done #{todo_done_active}"}
|
||||||
= link_to todos_filter_path(state: 'done') do
|
= link_to todos_filter_path(state: 'done') do
|
||||||
%span
|
%span
|
||||||
Done
|
Done
|
||||||
%span.badge
|
%span.badge
|
||||||
= todos_done_count
|
= number_with_delimiter(todos_done_count)
|
||||||
|
|
||||||
.nav-controls
|
.nav-controls
|
||||||
- if @todos.any?(&:pending?)
|
- if @todos.any?(&:pending?)
|
||||||
|
|
Loading…
Reference in New Issue