diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-07-20 00:27:04 +0900 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-07-20 00:27:04 +0900 |
commit | 5ffaaa71d149c9807260c950c9a61d01fe734827 (patch) | |
tree | b014dcbe7cc8efabebca38e9e75648905e85017e /actionpack/lib/action_controller/routing/generation | |
parent | 45d41d8012c605f21de51e7018fa31e1d07776eb (diff) | |
download | rails-5ffaaa71d149c9807260c950c9a61d01fe734827.tar.gz rails-5ffaaa71d149c9807260c950c9a61d01fe734827.tar.bz2 rails-5ffaaa71d149c9807260c950c9a61d01fe734827.zip |
Define ActiveModel API Compliance
- Define to_model on AR
- Define to_model on ActiveModel::APICompliant
- Update test fixtures to be API Compliant
- Start using to_model in AP
Diffstat (limited to 'actionpack/lib/action_controller/routing/generation')
-rw-r--r-- | actionpack/lib/action_controller/routing/generation/polymorphic_routes.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/routing/generation/polymorphic_routes.rb b/actionpack/lib/action_controller/routing/generation/polymorphic_routes.rb index c6f7de17bd..159d869a54 100644 --- a/actionpack/lib/action_controller/routing/generation/polymorphic_routes.rb +++ b/actionpack/lib/action_controller/routing/generation/polymorphic_routes.rb @@ -77,6 +77,7 @@ module ActionController end record = extract_record(record_or_hash_or_array) + record = record.to_model if record.respond_to?(:to_model) namespace = extract_namespace(record_or_hash_or_array) args = case record_or_hash_or_array |