diff options
author | José Valim <jose.valim@plataformatec.com.br> | 2012-02-04 07:00:49 -0800 |
---|---|---|
committer | José Valim <jose.valim@plataformatec.com.br> | 2012-02-04 07:00:49 -0800 |
commit | 44b9992c1179558fb9cd9b4c3524f3ab6d52daf9 (patch) | |
tree | 1583ec7b1e491c4519759bc75abe4825c24883b9 /actionpack/test/lib | |
parent | 9cb0e12e46e0385b132dbe8716097225b7ef0863 (diff) | |
parent | 567ac65b423c30c24aa6c0c0522858e3c240eb26 (diff) | |
download | rails-44b9992c1179558fb9cd9b4c3524f3ab6d52daf9.tar.gz rails-44b9992c1179558fb9cd9b4c3524f3ab6d52daf9.tar.bz2 rails-44b9992c1179558fb9cd9b4c3524f3ab6d52daf9.zip |
Merge pull request #4870 from sikachu/3-2-stable-responder-fix
Fix override API response bug in respond_with
Diffstat (limited to 'actionpack/test/lib')
-rw-r--r-- | actionpack/test/lib/controller/fake_models.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionpack/test/lib/controller/fake_models.rb b/actionpack/test/lib/controller/fake_models.rb index f2362714d7..bbb4cc5ef3 100644 --- a/actionpack/test/lib/controller/fake_models.rb +++ b/actionpack/test/lib/controller/fake_models.rb @@ -34,6 +34,16 @@ end class GoodCustomer < Customer end +class ValidatedCustomer < Customer + def errors + if name =~ /Sikachu/i + [] + else + [{:name => "is invalid"}] + end + end +end + module Quiz class Question < Struct.new(:name, :id) extend ActiveModel::Naming |