aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* cleanup, remove trailing whitespace within actionpackYves Senn2012-10-271-4/+4
|
* Extract ActiveRecord::SessionStore from RailsPrem Sichanugrist2012-08-241-288/+0
| | | | | This functionality will be available from gem `active_record-session_store` instead.
* Revert "polymorphic_url with an array generates a query string"Andrew White2012-08-041-14/+0
| | | | | Passing options as the last value in an array doesn't work with form_for. This reverts commit 61c8a4d926343903593a27080216af7e4ed81268.
* Revert "Refactor passing url options via array for polymorphic_url"Andrew White2012-08-041-7/+0
| | | | | Passing options as the last value in an array doesn't work with form_for. This reverts commit 6be564c7a087773cb0b51c54396cc190e4f5c983.
* Refactor passing url options via array for polymorphic_urlAndrew White2012-08-041-0/+7
| | | | | | | | Rather than keep the url options in record_or_hash_or_array, extract it and reverse merge with options as it may contain important private keys like `:routing_type`. Closes #7259
* polymorphic_url with an array generates a query stringRomain Tribes2012-08-041-0/+14
| | | | | Generating an URL with an array of records is now able to build a query string if the last item of the array is a hash.
* Merge pull request #6588 from nbibler/polymorphic_to_modelJosé Valim2012-06-011-1/+27
| | | | Correct the use of to_model in polymorphic routing
* Support cookie jar options for all cookie storesbrainopia2012-04-301-0/+7
|
* remove calls to deprecated find(:first) in actionpack test suiteSergey Nartimov2012-04-261-2/+2
|
* Remove default match without specified methodJose and Yehuda2012-04-241-1/+1
| | | | | | | | | | | | | | | | In the current router DSL, using the +match+ DSL method will match all verbs for the path to the specified endpoint. In the vast majority of cases, people are currently using +match+ when they actually mean +get+. This introduces security implications. This commit disallows calling +match+ without an HTTP verb constraint by default. To explicitly match all verbs, this commit also adds a :via => :all option to +match+. Closes #5964
* Make controller namespace partial prefix optionalGrant Hutchins2012-03-281-4/+56
| | | | | | | config.action_view.prefix_partial_path_with_controller_namespace This allows you to choose to render @post using /posts/_post.erb instead of /admin/posts/_post.erb inside Admin::PostsController.
* Test that render gets correct exact template nameGrant Hutchins2012-03-281-4/+4
|
* Remove rescue_action from compatibility module and testsCarlos Antonio da Silva2012-01-171-6/+4
|
* Deprecate set_table_name in favour of self.table_name= or defining your own ↵Jon Leighton2011-11-291-8/+8
| | | | method.
* Rely on a public contract between railties instead of accessing railtie ↵José Valim2011-11-231-4/+2
| | | | methods directly.
* Fixed session ID fixation for ActiveRecord::SessionStoreJoseph Wong2011-07-121-0/+31
| | | | | | | | | | | | | | | | | I have found that Rails will take an invalid session ID specified by the client and materialize a session based on that session ID. This means that it is possible, among other things, for a client to use an arbitrarily weak session ID or for a client to resurrect a previous used session ID. In other words, we cannot guarantee that all session IDs are generated by the server and that they are (statistically) unique through time. The fix is to always generate a new session ID in #get_session if an existing session cannot be found under the incoming session ID. Also added new tests that make sure that an invalid session ID is never materialized into a new session, regardless of whether it comes in via a cookie or a URL parameter (when :cookie_only => false).
* provide a more explicit message when using url_for with nilDamien Mathieu2011-07-021-0/+8
| | | This fixes the problem of having a non-explicit message when the :location option is not provided in respond_with.
* Take into account time spent in AR even if a redirect occurs or if it is ↵Frederick Cheung2011-05-231-0/+26
| | | | after the render
* Reset ActiveRecord::LogSubscriber runtime at the start of each requestTom Ward2011-05-141-0/+13
| | | | Previously the runtime was reset implicitly when #cleanup_view_runtime was called at the end of most requests. However, this doesn't happen when the request redirects, or send_file is called. Consequently, the ActiveRecord runtime recorded in the logs included the time taken for both the current request and the previous redirect. Explicitly resetting at the start of each request ensures that this can't happen, no matter what occurs previously.
* Escape regex in controller_runtime_test to actually check that the ↵Tom Ward2011-05-141-1/+1
| | | | ActiveRecord message appears
* minor cleaningVishnu Atrai2011-05-101-1/+1
|
* Replace rudimentary named_scope with scope. [#6052 state:resolved]Pavel Gorbokon2010-12-151-3/+3
| | | | | | | * rename method names (actually in tests) * rename instance variable @_named_scopes_cache to @_scopes_cache * rename references in doc comments * don't touch CHANGELOG :)
* Ensure calling reset session twice does not raise errors.José Valim2010-11-201-0/+12
|
* Allow AR Session Store to be renewedJosé Valim2010-11-111-0/+20
|
* in regexps, the dot in a character class is not a metacharacterXavier Noria2010-10-151-1/+1
|
* Remove duplicated class test. copy/paste fail?Emilio Tagua2010-09-281-32/+0
|
* Use parentheses when using assert_match followed by a regexp to avoid warnings.Emilio Tagua2010-09-271-2/+2
|
* Remove deprecated stuff in ActionControllerCarlos Antonio da Silva2010-09-261-1/+1
| | | | | | This removes all deprecated classes in ActionController related to Routing, Abstract Request/Response and Integration/IntegrationTest. All tests and docs were changed to ActionDispatch instead of ActionController.
* Removed deprecated RouteSet API, still many tests failPiotr Sarnacki2010-09-052-10/+10
|
* Use new ActiveModel::Naming.route_key in polymorphic_routesPiotr Sarnacki2010-09-031-1/+1
|
* Add possibility to explicitly call engine's routes through ↵Piotr Sarnacki2010-09-031-0/+8
| | | | polymorphic_routes, for example: polymorphic_url([blog, @post])
* Added more tests for polymorphic_url with namespaced models and implemented ↵Piotr Sarnacki2010-09-031-0/+56
| | | | missing use cases
* Deprecate the old router DSL. Since it is still used intensively across ↵José Valim2010-06-281-15/+15
| | | | ActionPack test suite, patches that translates Rails internal tests to the new router DSL are welcome (note though that a few tests shouldn't be translated since they are testing exactly the old mapper API, like the ones in actionpack/test/controller/resource_test.rb and actionpack/test/controller/routing_test.rb)
* Make sure that Rails doesn't resent session_id cookie over and over again if ↵Prem Sichanugrist2010-06-251-0/+12
| | | | | | | | it's already there [#2485 state:resolved] This apply to only Active Record store and Memcached store, as they both store only the session_id, which will be unchanged, in the cookie. Signed-off-by: José Valim <jose.valim@gmail.com>
* Move Rails::LogSubscriber to ActiveSupport::LogSubscriber, allowing ↵José Valim2010-06-241-5/+5
| | | | frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [#4816 state:resolved]
* Sessions should not be created until written to and session data should be ↵Michael Lovitt2010-06-231-2/+33
| | | | | | | | destroyed on reset. [#4938] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Make polymorphic_url and scaffolding work with uncountable resources [#3930 ↵Andrew White2010-06-201-0/+1
| | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com>
* Cut the fat and make session stores rely on request.cookie_jar and change ↵José Valim2010-05-181-1/+7
| | | | set_session semantics to return the cookie value instead of a boolean.
* Consistent routing languageJoshua Peek2010-03-301-82/+82
|
* Fix failing Action Pack testsCarlhuda2010-03-021-1/+1
|
* Stop setting UrlFor using SharedTestHelpersCarlhuda2010-02-261-1/+1
|
* Rename named_url_helpers to url_helpers and url_helpers to url_forCarlhuda2010-02-261-3/+3
|
* Fix all of AP's tests with the non global routerCarlhuda2010-02-251-3/+3
|
* Revert "Fix test load paths for those not using bundler"Carlhuda2010-02-231-5/+2
| | | | | | This reverts commit eec2d301d4ce9df9c71c1a5aa63053eb970b6818. This commit broke tests. You cannot have a file called "bundler" on the load path.
* Use ActionDispatch::Routing everywhereMartin Schürrer2010-02-211-3/+3
|
* Merge master.José Valim2010-02-171-2/+5
|\
| * Fix test load paths for those not using bundlerJoshua Peek2010-02-151-3/+6
| |
* | Rename Rails::Subscriber to Rails::LogSubscriberPrem Sichanugrist2010-02-161-8/+8
|/
* Default to sync instrumentation.José Valim2010-01-211-15/+4
|
* Move parameters to the top on logging.José Valim2010-01-191-2/+2
|