diff options
author | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-19 16:39:50 +0000 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2005-05-19 16:39:50 +0000 |
commit | bd79a4eb3b20c3e46fd7eaf79162df7429766514 (patch) | |
tree | 1e661cca1232348969597a0312f1be61092b4275 /activerecord/test/fixtures | |
parent | e84deb71d2e8a2855aba01bf88a710c8ae5ab1dc (diff) | |
download | rails-bd79a4eb3b20c3e46fd7eaf79162df7429766514.tar.gz rails-bd79a4eb3b20c3e46fd7eaf79162df7429766514.tar.bz2 rails-bd79a4eb3b20c3e46fd7eaf79162df7429766514.zip |
Fixed that clone would break when an aggregate had the same name as one of its attributes #1307 [bitsweat]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1309 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/test/fixtures')
-rw-r--r-- | activerecord/test/fixtures/developer.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/fixtures/developer.rb b/activerecord/test/fixtures/developer.rb index 78f8f54db7..6d01490844 100644 --- a/activerecord/test/fixtures/developer.rb +++ b/activerecord/test/fixtures/developer.rb @@ -4,3 +4,9 @@ class Developer < ActiveRecord::Base validates_inclusion_of :salary, :in => 50000..200000 validates_length_of :name, :within => 3..20 end + +DeveloperSalary = Struct.new(:amount) +class DeveloperWithAggregate < ActiveRecord::Base + self.table_name = 'developers' + composed_of :salary, :class_name => 'DeveloperSalary', :mapping => [%w(salary amount)] +end |