diff options
| author | Andrew8xx8 <avk@8xx8.ru> | 2013-03-25 15:58:09 +0400 |
|---|---|---|
| committer | Andrew8xx8 <avk@8xx8.ru> | 2013-03-25 15:58:09 +0400 |
| commit | 3e695acfa2f4035431cb325645b3114d06e43105 (patch) | |
| tree | 34f9ee77f6888c23e0ee7c4d8055b65b35b1d0e7 /app/models/note.rb | |
| parent | e3351287b4284af95390835bc75a6c3c461f04ba (diff) | |
| download | gitlab-ce-3e695acfa2f4035431cb325645b3114d06e43105.tar.gz | |
Notes fixed
Diffstat (limited to 'app/models/note.rb')
| -rw-r--r-- | app/models/note.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/note.rb b/app/models/note.rb index f56f999fda1..2f3b059918a 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -170,4 +170,10 @@ class Note < ActiveRecord::Base "wall" end end + + # FIXME: Hack for polymorphic associations with STI + # For more information wisit http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#label-Polymorphic+Associations + def noteable_type=(sType) + super(sType.to_s.classify.constantize.base_class.to_s) + end end |
