diff options
| author | Alexey Poimtsev | 2012-01-17 15:54:30 +0400 |
|---|---|---|
| committer | Alexey Poimtsev | 2012-01-17 15:54:30 +0400 |
| commit | 69127502f3a419beecd35dda687f5536524a4d7a (patch) | |
| tree | 42a2fe5c1068b8ca054664d11523cded1a2c6238 /lib | |
| parent | 6d444ac73749bd255892a888f3681c2d91405b53 (diff) | |
| download | inboxes-69127502f3a419beecd35dda687f5536524a4d7a.tar.bz2 | |
acts_as_discussable
added acts_as_discussable method. this method can be used in any model
to add ability on it
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/inboxes/active_record_extension.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/inboxes/active_record_extension.rb b/lib/inboxes/active_record_extension.rb index 2a5bac8..d6e7e36 100644 --- a/lib/inboxes/active_record_extension.rb +++ b/lib/inboxes/active_record_extension.rb @@ -7,5 +7,9 @@ module Inboxes has_many :speakers, :dependent => :destroy has_many :discussions, :through => :speakers end + + def acts_as_discussable + has_many :discussions, :as => :discussable + end end -end
\ No newline at end of file +end |
