Add delegate for project's name on Note.
This commit is contained in:
parent
41c00a20a9
commit
2d124d9496
2 changed files with 8 additions and 4 deletions
|
@ -7,6 +7,10 @@ class Note < ActiveRecord::Base
|
|||
belongs_to :author,
|
||||
:class_name => "User"
|
||||
|
||||
delegate :name,
|
||||
:to => :project,
|
||||
:prefix => true
|
||||
|
||||
delegate :name,
|
||||
:email,
|
||||
:to => :author,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue