diff --git a/couchrest_model.gemspec b/couchrest_model.gemspec index 6a8947f..8d54a83 100644 --- a/couchrest_model.gemspec +++ b/couchrest_model.gemspec @@ -25,9 +25,9 @@ Gem::Specification.new do |s| s.add_dependency(%q, "1.1.0.pre2") s.add_dependency(%q, "~> 1.15") - s.add_dependency(%q, "~> 3.0.0") + s.add_dependency(%q, "~> 3.0") s.add_dependency(%q, "~> 0.3.22") - s.add_dependency(%q, "~> 3.0.0") + s.add_dependency(%q, "~> 3.0") s.add_development_dependency(%q, ">= 2.0.0") s.add_development_dependency(%q, ">= 0.5.7") # s.add_development_dependency("jruby-openssl", ">= 0.7.3") diff --git a/lib/couchrest/model/properties.rb b/lib/couchrest/model/properties.rb index 229c5bc..7f78444 100644 --- a/lib/couchrest/model/properties.rb +++ b/lib/couchrest/model/properties.rb @@ -5,26 +5,13 @@ module CouchRest extend ActiveSupport::Concern included do - extlib_inheritable_accessor(:properties) unless self.respond_to?(:properties) - extlib_inheritable_accessor(:properties_by_name) unless self.respond_to?(:properties_by_name) + class_attribute(:properties) unless self.respond_to?(:properties) + class_attribute(:properties_by_name) unless self.respond_to?(:properties_by_name) self.properties ||= [] self.properties_by_name ||= {} raise "You can only mixin Properties in a class responding to [] and []=, if you tried to mixin CastedModel, make sure your class inherits from Hash or responds to the proper methods" unless (method_defined?(:[]) && method_defined?(:[]=)) end - # Returns the Class properties - # - # ==== Returns - # Array:: the list of properties for model's class - def properties - self.class.properties - end - - # Returns all the class's properties as a Hash where the key is the name - # of the property. - def properties_by_name - self.class.properties_by_name - end # Returns the Class properties with their values # diff --git a/lib/couchrest_model.rb b/lib/couchrest_model.rb index 7de6b41..8892ea4 100644 --- a/lib/couchrest_model.rb +++ b/lib/couchrest_model.rb @@ -1,7 +1,6 @@ require 'active_model' require "active_model/callbacks" require "active_model/conversion" -require "active_model/deprecated_error_methods" require "active_model/errors" require "active_model/naming" require "active_model/serialization"