diff options
author | Taryn East <git@taryneast.org> | 2009-10-02 10:13:40 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-10-02 10:13:40 -0500 |
commit | 8377646d68b32de362fefad0d752a923f6b36da6 (patch) | |
tree | a2f4b8d2d9b4021acc5efc551ec7578d5e24d923 /activeresource/lib | |
parent | f4f68885efd0e1135217433cafd368902b1fd58a (diff) | |
download | rails-8377646d68b32de362fefad0d752a923f6b36da6.tar.gz rails-8377646d68b32de362fefad0d752a923f6b36da6.tar.bz2 rails-8377646d68b32de362fefad0d752a923f6b36da6.zip |
add indifferent access to the attributes
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'activeresource/lib')
-rw-r--r-- | activeresource/lib/active_resource/base.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activeresource/lib/active_resource/base.rb b/activeresource/lib/active_resource/base.rb index 8fc0999c70..3a07811f26 100644 --- a/activeresource/lib/active_resource/base.rb +++ b/activeresource/lib/active_resource/base.rb @@ -1,6 +1,7 @@ require 'active_support' require 'active_support/core_ext/class/attribute_accessors' require 'active_support/core_ext/class/inheritable_attributes' +require 'active_support/core_ext/hash/indifferent_access' require 'active_support/core_ext/kernel/reporting' require 'active_support/core_ext/module/attr_accessor_with_default' require 'active_support/core_ext/module/delegation' @@ -770,7 +771,7 @@ module ActiveResource # my_other_course = Course.new(:name => "Philosophy: Reason and Being", :lecturer => "Ralph Cling") # my_other_course.save def initialize(attributes = {}) - @attributes = {} + @attributes = {}.with_indifferent_access @prefix_options = {} load(attributes) end |