Pratik Naik
3bd3e992ff
Improved indentation
2010-09-06 11:54:02 +01:00
Santiago Pastorino
0a7b481903
Use scoped here to get the scoped where
2010-09-05 20:30:43 -03:00
Carlos Antonio da Silva
c91605b15b
Refactor a bit dependencies logging
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-05 18:14:47 +02:00
Carlos Antonio da Silva
9a776c2978
Improve dependencies by not calling constantize(const) twice while removing unloadable constants
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-05 18:14:47 +02:00
Carlos Antonio da Silva
69a4c67a3f
Fix docs related to param_key in ActiveModel::Naming
...
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-05 18:14:37 +02:00
José Valim
8a3461b8c1
Remove a few tests from old router that do not make sense with the new one.
2010-09-05 15:59:35 +02:00
José Valim
9757bfff9b
Merge remote branch 'drogus/remove_deprecated_routes'
...
This merge removes the deprecated routes mapper from Rails and update its tests.
2010-09-05 15:45:12 +02:00
Santiago Pastorino
e20012b64b
Make number_to_human and number_with_precision work with negatives
2010-09-05 10:21:55 -03:00
Santiago Pastorino
d717ff9e52
Fix indentation errors
2010-09-05 10:07:37 -03:00
Santiago Pastorino
88dfe16d95
Fix code style a bit
2010-09-05 10:06:09 -03:00
Ben Sharpe
b80cf265be
Fix number_to_human(0) exception [ #5532 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-05 09:56:13 -03:00
Piotr Sarnacki
e909afccc9
Deleted test with extended regexp - it fails with no reason, probably rack-mount is doing something weird with that regexp
2010-09-05 13:44:39 +02:00
Łukasz Strzałkowski
5b550523b7
Fixed 2 broken tests for router.
...
They were broken after rebase/merge
2010-09-05 13:44:39 +02:00
Łukasz Strzałkowski
8f2c0bf1a0
This test is invalid for new router
2010-09-05 13:44:39 +02:00
Łukasz Strzałkowski
faba03850a
Removed deprecated_mapper - we don't need it anymore
2010-09-05 13:44:39 +02:00
Łukasz Strzałkowski
eac8b9cf05
Removed tests for setting default value of *path in route
...
If we want to have this - we have to change Rack::Mount source
2010-09-05 13:44:38 +02:00
Łukasz Strzałkowski
b478ff9150
Made test_generate pass
...
I've removed assertions with @routes.generate(:use_route => ...). I'm not 100% sure if not supporting :use_route in new router is intentional or it should rather be supported and backported from 2.3.x.
2010-09-05 13:44:38 +02:00
Łukasz Strzałkowski
af72cf4799
If it's unused there's no reason to keep it commented. It will always remain in git history, so removing it.
2010-09-05 13:44:38 +02:00
Piotr Sarnacki
b7bfeaa9fc
Fix action mailer tests after old mapper removal
2010-09-05 13:44:38 +02:00
Piotr Sarnacki
ca3936dbd6
Ported missing functionality from Rails 2.3.x, raise error on wrong regexps in :constraints in routes
2010-09-05 13:44:38 +02:00
Piotr Sarnacki
c15bb4901b
Fixed routes to use new API in a few more actionpack tests
2010-09-05 13:44:37 +02:00
Łukasz Strzałkowski
442e54967c
Removed rest of errors and failures in routing_test.rb. Almost all squashed, only few left
2010-09-05 13:44:37 +02:00
Piotr Sarnacki
3088b4f84f
raise error on invalid HTTP methods or :head passed with :via in routes
2010-09-05 13:44:37 +02:00
Piotr Sarnacki
8958f332bb
Implemented resources :foos, :except => :all option
2010-09-05 13:44:37 +02:00
Piotr Sarnacki
e6b93fa6db
Removed deprecated router API from railties
2010-09-05 13:44:37 +02:00
Łukasz Strzałkowski
7c50454529
Test for recognizing routes with http method set
2010-09-05 13:44:37 +02:00
Łukasz Strzałkowski
8412886bdb
Fixed about half of broken tests in routing_test
2010-09-05 13:44:37 +02:00
Piotr Sarnacki
415bacd7bf
Fixed almost all resources tests
2010-09-05 13:44:36 +02:00
Łukasz Strzałkowski
8659c5e657
Fixed url_for test
...
Added route which matches all: controller, action, id and format
2010-09-05 13:44:36 +02:00
Łukasz Strzałkowski
aac390204a
Revert "Extended default route for match in tests - now it matches controller, action, id and format if given."
...
This reverts commit 05e9d0df0dea68ca4655aa8723c3ee69049fac78.
2010-09-05 13:44:36 +02:00
Łukasz Strzałkowski
7ff8a2040e
Extended default route for match in tests - now it matches controller, action, id and format if given.
...
This fixes url_for tests
2010-09-05 13:44:36 +02:00
Piotr Sarnacki
b3eb26a161
Removed deprecated RouteSet API, still many tests fail
2010-09-05 13:44:36 +02:00
Santiago Pastorino
708ee9c5ac
Make scoped reorder override previous applied orders
...
[5528 state:committed]
2010-09-05 08:28:11 -03:00
Nick Ragaz
16e078d908
failing test for reorder overriding default_scope
...
[5528]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-05 08:27:51 -03:00
Neeraj Singh
91fec0d24d
order should always be concatenated.
...
order that is declared first has highest priority in all cases.
Here are some examples.
Car.order('name desc').find(:first, :order => 'id').name
Car.named_scope_with_order.named_scope_with_another_order
Car.order('id DESC').scoping do
Car.find(:first, :order => 'id asc')
end
No special treatment to with_scope or scoping.
Also note that if default_scope declares an order then the order
declared in default_scope has the highest priority unless
with_exclusive_scope is used.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-05 08:13:42 -03:00
José Valim
f9c21ce658
Remove more deprecated behavior from plugins.
2010-09-04 01:11:22 +02:00
José Valim
6f194bb3a9
Small tidy up on Rails::Engine.
2010-09-04 00:52:07 +02:00
José Valim
23a9455962
This commit merges most of the work done by Piotr Sarnacki in his Ruby Summer of Code project.
...
His work brings several capabilities from app to engines, as routes, middleware stack, asset handling and much more. Please check Rails::Engine documentation for more refenrences.
Merge remote branch 'drogus/engines'
2010-09-04 00:31:43 +02:00
Piotr Sarnacki
c3c1a1e148
Do not use ActionController::Base.page_cache_extension in initialize to not load more ActiveSupport than we need
2010-09-04 00:07:38 +02:00
Piotr Sarnacki
9f0a1ae14e
Optimize ActionDispatch::Static
2010-09-04 00:07:34 +02:00
Piotr Sarnacki
89bd715f6b
Forgot to move that line to railtie on rebase
2010-09-03 22:59:16 +02:00
Piotr Sarnacki
ffa2acad5c
Fixed tests after rebase
2010-09-03 22:59:16 +02:00
Piotr Sarnacki
9af189ac8f
I've changed that test along the way, it should actually stay without changes
2010-09-03 22:59:16 +02:00
Piotr Sarnacki
6c906bf591
Use default_scope in isolated Engines to not force user to scope his routes
2010-09-03 22:59:15 +02:00
Piotr Sarnacki
b8d6dc3c84
Implemented RouteSet#default_scope, which allows to set the scope for the entire routes object
2010-09-03 22:59:15 +02:00
Piotr Sarnacki
b43b686b02
engines_blank_point should always be the last initializer in Engine
2010-09-03 22:59:15 +02:00
Piotr Sarnacki
a5e509d6b1
We should avoid creating additional initializers when we can, adding them makes boot process slower
2010-09-03 22:59:15 +02:00
Piotr Sarnacki
bf1ac82cec
Add some documantation on new route_key and param_key in ActiveModel::Naming
2010-09-03 22:59:15 +02:00
Piotr Sarnacki
6f3119d3c2
Remove namespace for isolated namespaced models in forms
2010-09-03 22:59:15 +02:00
Piotr Sarnacki
2607def862
Use new ActiveModel::Naming.route_key in polymorphic_routes
2010-09-03 22:59:15 +02:00