aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/lib
diff options
context:
space:
mode:
authorSam Pohlenz <sam@sampohlenz.com>2011-06-22 10:54:45 +0930
committerSam Pohlenz <sam@sampohlenz.com>2011-06-22 10:54:45 +0930
commit237f87089cbb01da50408cc07dffc89a7ebf6854 (patch)
tree0d5a2f838d8a60a499f0624f22ca256d8cf36d96 /actionpack/test/lib
parente69eed0e10c0670869aea396cb79002da4f4580a (diff)
downloadrails-237f87089cbb01da50408cc07dffc89a7ebf6854.tar.gz
rails-237f87089cbb01da50408cc07dffc89a7ebf6854.tar.bz2
rails-237f87089cbb01da50408cc07dffc89a7ebf6854.zip
Use real hash model in nested fields_for with hash model test
Diffstat (limited to 'actionpack/test/lib')
-rw-r--r--actionpack/test/lib/controller/fake_models.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/actionpack/test/lib/controller/fake_models.rb b/actionpack/test/lib/controller/fake_models.rb
index 67baf369e2..cbef74f992 100644
--- a/actionpack/test/lib/controller/fake_models.rb
+++ b/actionpack/test/lib/controller/fake_models.rb
@@ -170,6 +170,17 @@ class Author < Comment
def post_attributes=(attributes); end
end
+class HashBackedAuthor < Hash
+ extend ActiveModel::Naming
+ include ActiveModel::Conversion
+
+ def persisted?; false; end
+
+ def name
+ "hash backed author"
+ end
+end
+
module Blog
def self._railtie
self