aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/controller/record_identifier_test.rb
Commit message (Collapse)AuthorAgeFilesLines
* Removing : warning: ambiguous first argument;Arun Agrawal2013-01-171-4/+4
|
* Deprecate direct calls to AC::RecordIdentifier.dom_id and dom_classCarlos Antonio da Silva2013-01-161-0/+34
| | | | Also add some generic tests to ensure they're properly deprecated.
* Move ActionController::RecordIdentifier to ActionViewPiotr Sarnacki2012-08-281-40/+0
| | | | | | | Since it's more about DOM classes and ids it belongs to Action View better. What's more, it's more convenient to make it part of Action View to follow the rule that Action Pack can depend on Action View, but not the other way round.
* AP tests should inherit from AS::TestCaseAaron Patterson2012-01-051-1/+1
|
* moving fake model to the correct fileAaron Patterson2010-10-031-13/+0
|
* removing more duplicate code. :'(Aaron Patterson2010-10-011-13/+1
|
* Moved a few methods from RecordIdentifier to ActiveModel::NamingPiotr Sarnacki2010-07-211-40/+0
| | | | Signed-off-by: José Valim <jose.valim@gmail.com>
* Make polymorphic_url and scaffolding work with uncountable resources [#3930 ↵Andrew White2010-06-201-2/+21
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* AMo #key is now #to_key and CI is probably happysnusnu2010-02-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Obviously #key is a too common name to be included in the AMo interface, #to_key fits better and also relates nicely to #to_param. Thx wycats, koz and josevalim for the suggestion. AR's #to_key implementation now takes customized primary keys into account and there's a testcase for that too. The #to_param AMo lint makes no assumptions on how the method behaves in the presence of composite primary keys. It leaves the decision wether to provide a default, or to raise and thus signal to the user that implementing this method will need his special attention, up to the implementers. All AMo cares about is that #to_param is implemented and returns nil in case of a new_record?. The default CompliantObject used in lint_test provides a naive default implementation that just joins all key attributes with '-'. The #to_key default implementation in lint_test's CompliantObject now returns [id] instead of [1]. This was previously causing the (wrong) tests I added for AR's #to_key implementation to pass. The #to_key tests added with this patch should be better. The CI failure was caused by my lack of knowledge about the test:isolated task. The tests for the record_identifier code in action_controller are using fake non AR models and I forgot to stub the #to_key method over there. This issue didn't come up when running the test task, only test:isolated revealed it. This patch fixes that. All tests pass isolated or not, well, apart from one previously unpended test in action_controller that is unrelated to my patch.
* Clean up render @object a bit more.Yehuda Katz2009-08-071-57/+0
|
* AMo conversion helperJoshua Peek2009-07-211-1/+2
|
* Define ActiveModel API ComplianceYehuda Katz2009-07-201-1/+1
| | | | | | - Define to_model on AR - Define to_model on ActiveModel::APICompliant - Update test fixtures to be API Compliant - Start using to_model in AP
* Move model naming into ActiveModelJoshua Peek2009-06-171-0/+2
|
* Make render shorthands work with namespaced controllersJacek Becela2008-05-101-0/+36
| | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
* require abstract_unit directly since test is in load pathJeremy Kemper2008-01-051-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added record identifications to FormHelper#form_for and ↵David Heinemeier Hansson2007-05-141-16/+17
| | | | | | PrototypeHelper#remote_form_for [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6731 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added the first part of Simply Helpful to core. The rest is pending a clean ↵David Heinemeier Hansson2007-04-301-0/+102
integartion of polymorphic urls [DHH] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6633 5ecf4fe2-1ee6-0310-87b1-e25e094e27de