From fde3d9d8e432b0834d03888ff6e180359e038391 Mon Sep 17 00:00:00 2001 From: Jeremy Kemper Date: Sat, 9 Jun 2007 04:42:32 +0000 Subject: Remove ActiveResource::Struct because it hasn't proven very useful. Creating a new ActiveResource::Base subclass is often less code and always clearer. Closes #8612. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6980 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- activeresource/CHANGELOG | 2 ++ activeresource/lib/active_resource.rb | 1 - activeresource/lib/active_resource/struct.rb | 16 ---------------- 3 files changed, 2 insertions(+), 17 deletions(-) delete mode 100644 activeresource/lib/active_resource/struct.rb (limited to 'activeresource') diff --git a/activeresource/CHANGELOG b/activeresource/CHANGELOG index 08a4e6a56b..8dbfd41322 100644 --- a/activeresource/CHANGELOG +++ b/activeresource/CHANGELOG @@ -1,5 +1,7 @@ *SVN* +* Remove ActiveResource::Struct because it hasn't proven very useful. Creating a new ActiveResource::Base subclass is often less code and always clearer. #8612 [Josh Peek] + * Fix query methods on resources. [Cody Fauser] * pass the prefix_options to the instantiated record when using find without a specific id. Closes #8544 [alloy] diff --git a/activeresource/lib/active_resource.rb b/activeresource/lib/active_resource.rb index 83039606af..67961630e3 100644 --- a/activeresource/lib/active_resource.rb +++ b/activeresource/lib/active_resource.rb @@ -35,7 +35,6 @@ unless defined?(ActiveSupport) end require 'active_resource/base' -require 'active_resource/struct' require 'active_resource/validations' require 'active_resource/custom_methods' diff --git a/activeresource/lib/active_resource/struct.rb b/activeresource/lib/active_resource/struct.rb deleted file mode 100644 index ee1f15d781..0000000000 --- a/activeresource/lib/active_resource/struct.rb +++ /dev/null @@ -1,16 +0,0 @@ -module ActiveResource - # Class that allows a connection to a remote resource. - # Person = ActiveResource::Struct.new do |p| - # p.uri "http://www.mypeople.com/people" - # p.credentials :username => "mycreds", :password => "wordofpassage" - # end - # - # person = Person.find(1) - # person.name = "David" - # person.save! - class Struct - def self.create - Class.new(Base) - end - end -end \ No newline at end of file -- cgit v1.2.3