Resolved issue #235
This commit is contained in:
parent
15016ae68d
commit
91d5a906f9
4 changed files with 63 additions and 3 deletions
|
@ -27,6 +27,7 @@ class Note < ActiveRecord::Base
|
|||
|
||||
scope :common, where(:noteable_id => nil)
|
||||
|
||||
scope :today, where("created_at >= :date", :date => Date.today)
|
||||
scope :last_week, where("created_at >= :date", :date => (Date.today - 7.days))
|
||||
scope :since, lambda { |day| where("created_at >= :date", :date => (day)) }
|
||||
scope :fresh, order("created_at DESC")
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
= link_to wall_project_path(@project), :class => current_page?(:controller => "projects", :action => "wall", :id => @project) ? "current" : nil do
|
||||
Wall
|
||||
- if @project.common_notes.count > 0
|
||||
%span{ :class => "number" }= @project.common_notes.count
|
||||
%span{ :class => "number" }= @project.common_notes.today.count
|
||||
= link_to project_snippets_path(@project), :class => (controller.controller_name == "snippets") ? "current" : nil do
|
||||
Snippets
|
||||
- if @project.snippets.count > 0
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue