lib/ask/acts_as_asker.rb in ask-0.5.2 vs lib/ask/acts_as_asker.rb in ask-0.5.3

- old
+ new

@@ -1,8 +1,10 @@ class ActiveRecord::Base def self.acts_as_asker has_many :questions, :as => :asker, :dependent => :destroy - - attr_accessible :questions_attributes + + if respond_to? :attr_accessible # Rails 3.2 backwards compatibility + attr_accessible :questions_attributes + end accepts_nested_attributes_for :questions, :allow_destroy=>true, :reject_if=>lambda{|attrs| attrs['name'].blank? } end end