test/helper.rb in property_sets-2.4.0 vs test/helper.rb in property_sets-2.5.0
- old
+ new
@@ -14,15 +14,17 @@
require 'active_support/core_ext'
require 'active_record'
require 'active_record/fixtures'
require 'shoulda'
-if ActiveRecord::VERSION::MAJOR > 2 && ActiveRecord::VERSION::MAJOR < 4
+if ActiveRecord::VERSION::MAJOR > 2
if ActiveRecord::VERSION::MINOR > 1
ActiveRecord::Base.mass_assignment_sanitizer = :strict
end
-
+ if ActiveRecord::VERSION::MAJOR == 4
+ require 'protected_attributes'
+ end
ActiveRecord::Base.attr_accessible
end
I18n.enforce_available_locales = false if ActiveRecord::VERSION::MAJOR > 2
@@ -58,13 +60,11 @@
class Account < ActiveRecord::Base
include PropertySets::Delegator
delegate_to_property_set :settings, :old => :hep
- if ActiveRecord::VERSION::MAJOR < 4
- attr_accessible :name
- attr_accessible :texts_attributes
- end
+ attr_accessible :name
+ attr_accessible :texts_attributes
property_set :settings do
property :foo
property :bar
property :baz