From 871fa1f7717790392bb11a83b46a815796ac3f71 Mon Sep 17 00:00:00 2001 From: Daniel Amireh Date: Fri, 3 Feb 2012 18:57:15 +0200 Subject: [PATCH] Rails 3.2 support *removed deprecated write_inheritable_attribute and class_inheritable_reader --- 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 f066fd8..3b029b5 100644 --- a/lib/commentable_methods.rb +++ b/lib/commentable_methods.rb @@ -12,8 +12,8 @@ def self.included(base) module ClassMethods def acts_as_commentable(*args) comment_roles = args.to_a.flatten.compact.map(&:to_sym) - write_inheritable_attribute(:comment_types, (comment_roles.blank? ? [:comments] : comment_roles)) - class_inheritable_reader(:comment_types) + class_attribute :comment_types + self.comment_types = (comment_roles.blank? ? [:comments] : comment_roles) options = ((args.blank? or args[0].blank?) ? {} : args[0])