From 3bf59879072f2b912ce0b58f73a8d64ccd6e9486 Mon Sep 17 00:00:00 2001 From: Jack Dempsey Date: Sun, 14 Mar 2010 17:46:04 -0400 Subject: [PATCH] allow options to be passed to acts_as_commentable so you can pass in values for :include, etc --- lib/commentable_methods.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/commentable_methods.rb b/lib/commentable_methods.rb index 199ae06..3880247 100644 --- a/lib/commentable_methods.rb +++ b/lib/commentable_methods.rb @@ -10,8 +10,8 @@ def self.included(base) end module ClassMethods - def acts_as_commentable - has_many :comments, :as => :commentable, :dependent => :destroy + def acts_as_commentable(options={}) + has_many :comments, {:as => :commentable, :dependent => :destroy}.merge(options) include Juixe::Acts::Commentable::InstanceMethods extend Juixe::Acts::Commentable::SingletonMethods end