diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-07-20 23:28:58 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-07-20 23:28:58 -0500 |
commit | 2685d93b0728b647b6f49f3e1802c779d5fb9867 (patch) | |
tree | a13ca815c54f66749edce249fd7421d7b14108a8 /activemodel/lib/active_model | |
parent | e7a2496fda92ff4e39c127b065bf51ed6301e772 (diff) | |
download | rails-2685d93b0728b647b6f49f3e1802c779d5fb9867.tar.gz rails-2685d93b0728b647b6f49f3e1802c779d5fb9867.tar.bz2 rails-2685d93b0728b647b6f49f3e1802c779d5fb9867.zip |
Kill AMo ivar attributes helper
Diffstat (limited to 'activemodel/lib/active_model')
-rw-r--r-- | activemodel/lib/active_model/attributes.rb | 25 | ||||
-rw-r--r-- | activemodel/lib/active_model/serializers/json.rb | 1 | ||||
-rw-r--r-- | activemodel/lib/active_model/serializers/xml.rb | 1 |
3 files changed, 0 insertions, 27 deletions
diff --git a/activemodel/lib/active_model/attributes.rb b/activemodel/lib/active_model/attributes.rb deleted file mode 100644 index ea8c8d5f72..0000000000 --- a/activemodel/lib/active_model/attributes.rb +++ /dev/null @@ -1,25 +0,0 @@ -require 'active_support/core_ext/object/instance_variables' - -module ActiveModel - module Attributes - def self.append_features(base) - unless base.instance_methods.include?('attributes') - super - else - false - end - end - - def attributes - instance_values - end - - def read_attribute(attr_name) - instance_variable_get(:"@#{attr_name}") - end - - def write_attribute(attr_name, value) - instance_variable_set(:"@#{attr_name}", value) - end - end -end diff --git a/activemodel/lib/active_model/serializers/json.rb b/activemodel/lib/active_model/serializers/json.rb index adf200597d..e94512fd64 100644 --- a/activemodel/lib/active_model/serializers/json.rb +++ b/activemodel/lib/active_model/serializers/json.rb @@ -5,7 +5,6 @@ module ActiveModel module Serializers module JSON extend ActiveSupport::Concern - include ActiveModel::Attributes included do extend ActiveModel::Naming diff --git a/activemodel/lib/active_model/serializers/xml.rb b/activemodel/lib/active_model/serializers/xml.rb index 7cdd281223..76a0e54a56 100644 --- a/activemodel/lib/active_model/serializers/xml.rb +++ b/activemodel/lib/active_model/serializers/xml.rb @@ -5,7 +5,6 @@ module ActiveModel module Serializers module Xml extend ActiveSupport::Concern - include ActiveModel::Attributes class Serializer < ActiveModel::Serializer #:nodoc: class Attribute #:nodoc: |