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
Piotr Sarnacki
bac0826b1f
Refactor namespaced generators to use module_namespacing block helper
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-24 21:02:30 +02:00
Piotr Sarnacki
e83634081a
Generators are not aware of namespace of isolated engines and applications
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-24 21:02:24 +02:00
tnp
55b6fa9370
restore behavior of touch for models without :updated_xx [ #5439 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-24 20:42:38 +02:00
Rodrigo Rosenfeld Rosas
8d30193b08
Properly interpolate i18n keys in modules [ #5572 state:resolved]
2010-09-24 20:41:12 +02:00
Emilio Tagua
f625b87f24
These tests shouldn't depend on local time to pass or fail, we can use utc here.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-24 15:51:29 +02:00
Emilio Tagua
63039b9c33
Fix typo and add sanity test for code statistics rake task.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-24 15:51:29 +02:00
Fred Wu
51e8435e34
Ensures the app generator generates the correct @app_name. [ #5434 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-24 13:10:26 +02:00
José Valim
6b3ad0cafc
There is no need to use instance_eval since the proc is created in the same context it is eval'ed.
2010-09-24 12:54:31 +02:00
David Chelimsky
672ce11d68
only abort in test_help in production env
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-24 12:52:38 +02:00
Nando Vieira
7223fe7faf
Make redirect_to accept blocks [ #5643 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-24 12:49:27 +02:00
Obie Fernandez
275f922a23
Better shortcut options for custom validators [ #5672 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-24 12:49:16 +02:00
Neeraj Singh
097240f602
reject_id option should be respected while using nested_attributes
...
[#5579 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-24 12:46:24 +02:00
Kevin Hughes
f48c56008e
Changed documentation for auto_link so that the truncate example works [ #5694 state:resolved]
...
Signed-off-by: Xavier Noria <fxn@hashref.com >
2010-09-24 00:58:43 +02:00
Xavier Noria
8c0c815ba7
resolves rdoc conflict
2010-09-23 22:35:08 +02:00