thedarkone
e12e2fb4f6
Cache 2 of Request's commonly called methods.
2010-09-27 17:45:59 +02:00
thedarkone
8fdb34b237
Cache url_options on a per-request basis.
2010-09-27 17:45:59 +02:00
thedarkone
86bcccf8df
No need to create a separate lambda for each call.
2010-09-27 17:45:59 +02:00
thedarkone
7b2d51817d
Make asset extension rewriting faster.
2010-09-27 17:45:58 +02:00
thedarkone
05e53b4c1a
Optimize relative_url_root rewriting code.
2010-09-27 17:45:58 +02:00
thedarkone
f2e0b3575e
Use native attr_* macros for performance reasons.
2010-09-27 17:45:58 +02:00
thedarkone
320382ccd3
Creating singleton class for every object whenever the instance-level accessor is used quite is expensive.
2010-09-27 17:45:58 +02:00
thedarkone
5a518487fe
Try to use Hash's native #[] for speed.
2010-09-27 17:45:58 +02:00
thedarkone
8cda132136
Make InheritableOptions's constructor more flexible.
2010-09-27 17:45:58 +02:00
thedarkone
918dc27345
Compile ActionController::Base.config's methods to avoid method_missing overhead.
2010-09-27 17:45:58 +02:00
Aaron Patterson
7918a5c966
third parameter is not used
2010-09-26 18:25:13 -07:00
Nic Benders
f8c7f4cc53
db:structure:dump should list current Rails.env adapter in errors, not always the test adapter
...
[#5710 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-09-26 20:45:30 -03:00
Tim Connor
d6f7b7d353
Fix remove_index issue when provided :name is a symbol
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-09-26 20:40:14 -03:00
Santiago Pastorino
56de4e9a80
Fix the precedence issue here
2010-09-26 17:54:00 -03:00
Santiago Pastorino
db23e32141
Not need to do this double ternary
2010-09-26 17:43:26 -03:00
Santiago Pastorino
29f13beda3
port is appended twice to HTTP_HOST when host already has the port
2010-09-26 12:06:19 -03:00
Santiago Pastorino
14d2feeeab
Bump up some deps
2010-09-26 00:29:38 -03:00
Carlos Antonio da Silva
12db1a39cd
Partial revert of #d650b71 'Remove deprecated stuff in ActionController'
...
This brings back the deprecated modules from ActionController, because
they didn't have any deprecation warning.
2010-09-26 02:13:48 +08:00
Carlos Antonio da Silva
ecc13f7c18
We don't need to check if the format exists to generate the url, it already does it internally
2010-09-26 02:13:48 +08:00
Carlos Antonio da Silva
00e7633555
More cleanup on form helpers
2010-09-26 02:13:47 +08:00
Carlos Antonio da Silva
6345899489
Remove last tests with deprecated form_for and cleanup form_for helper
...
This cleans up the last bits of deprecation stuff from form_for helper.
However there is still a bug when using :as => foo[], with index. The
classes and ids are being generated using [], such as foo[]_edit. This
bug already existed but it was not detected before.
2010-09-26 02:13:47 +08:00
Carlos Antonio da Silva
db57e92784
Select tags with array options are deprecated, removing
2010-09-26 02:13:46 +08:00
Carlos Antonio da Silva
eb8a24a375
Refactor form_for helper
2010-09-26 02:13:46 +08:00
Carlos Antonio da Silva
8a16485a96
Review most of the form_for deprecated tests, missing tests with index like []
2010-09-26 02:13:45 +08:00
Carlos Antonio da Silva
7fc1edd790
Remove deprecated stuff in ActionController
...
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.
2010-09-26 02:13:45 +08:00
Carlos Antonio da Silva
ff3f55ee58
There is no need to open AC::Base three times to setup tests.
2010-09-26 02:13:44 +08:00
Carlos Antonio da Silva
f405df6e57
There is no DeprecatedBlockHelpers in AV, so remove it
2010-09-26 02:13:44 +08:00
José Valim
e0c344dc49
Fix active_resource assertions.
2010-09-25 17:56:56 +02:00
Piotr Sarnacki
f8294cb8ba
Fix app and actions generators tests
...
Normally Rails.application is an instance, but for those
tests Rails.application needs to be class.
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 17:28:39 +02:00
Piotr Sarnacki
0134c5cc94
Refactor a few methods connected with namespacing in Rails::Generators::NamedBase
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 17:28:10 +02:00
Piotr Sarnacki
51c7660e08
Add namespacing to mailer generator
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 17:28:10 +02:00
Piotr Sarnacki
7acf64a81b
Add namespacing for observer generator
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 17:28:10 +02:00
Piotr Sarnacki
49c3ad7f77
Add namespace for test_unit generators
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 17:28:10 +02:00
Jacques Crocker
51f1f550da
Allow per Resource format settings
...
Previously, ActiveResource was using the connection level formatter for get requests. This made it impossible to use custom formatters per resource.
Additionally this commit makes the Connection request methods more consistent. It always returns a Response. The base will then decode it each the response using its format setting.
Merging this commit will allow users to add custom formatters on a per Resource basis. This enables handling pagination responses from the server side, a very common use case that was previously impossible without monkeypatching XmlFormat.
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 13:54:09 +02:00
Jacques Crocker
ee5ef67c44
Allow ActiveResource to work with non-generated ids [ #5660 state:resolved]
...
This commit updates new? so that it knows whether or not the record was actually new or not, and doesn't rely solely on the presence of id. This enables the ability to set a custom primary_key that is not autogenerated by the server.
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 11:15:40 +02:00
Krekoten' Marjan
1b7d30bfc9
Fix 'warning: method redefined' [ #5551 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 11:06:55 +02:00
Krekoten' Marjan
8639c10a40
Fix logging when cache key contains % sign [ #5570 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 11:04:20 +02:00
Krekoten' Marjan
da94d0e8ca
Remove duplicate helper method
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 11:02:46 +02:00
José Valim
e6d503bcfb
Update abort message (ht: tilsammans).
2010-09-25 11:01:43 +02:00
John Firebaugh
75a960ca6e
Don't act destructively on ActiveModel::Name#human options hash. [ #5366 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 10:59:54 +02:00
John Firebaugh
308517e913
Don't duplicate Rack::Response functionality. [ #5320 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 10:58:07 +02:00
John Firebaugh
c509379923
Add ActionDispatch::TestResponse tests.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 10:52:57 +02:00
Piotr Sarnacki
135d6164c5
Rails.application is set anyway, we don't need to set it manually, this was purpose of different behavior in tests and in application
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 10:46:22 +02:00
Piotr Sarnacki
00aa13bc0e
Generators fix: properly check if module should be created when creating a namespaced model
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-25 10:46:22 +02:00
Andrew Kaspick
fb08e334d6
memoized protected methods should remain protected
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-09-24 20:31:12 -03:00
Marcelo Giorgi
72543b2e63
Delegate ActiveRecord::Base.offset to scoped methods (analogous to limit) [ #5688 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-09-24 20:24:54 -03:00
Aaron Patterson
a0db7be4af
attr_accessor_with_default should raise an ArgumentError not a RuntimeError
2010-09-24 14:48:57 -07:00
Brian Candler
a348ffcb2d
Fix warning message when db/schema.rb doesn't exist [ #5625 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-09-24 17:40:03 -03:00
Jeff Kreeftmeijer
d82d98dcd5
got rid of the "ambiguous first argument; put parentheses or even spaces" warnings in the scaffold_generator tests [ #4872 state:resolved]
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-09-24 16:17:39 -03:00
José Valim
127da544bb
Bump thor version requirement.
2010-09-24 21:03:12 +02:00