Commit Graph

9102 Commits

Author SHA1 Message Date
schneems
bbfd29a655 show routes while debugging added to changelog 2012-07-07 15:59:27 -05:00
@schneems and @mattt
ef91cddb48 move route_inspector to actionpack
this is so we can show route output in the development when we get a routing error. Railties can use features of ActionDispatch, but ActionDispatch should not depend on Railties.
2012-07-07 15:39:49 -05:00
schneems
fa714ec7df show routes while debugging RoutingError
If someone receives a routing error, they likely need to view the routes. Rather than making them visit '/rails/info/routes' or run `rake routes` we can give them that information on the page.
2012-07-07 15:38:29 -05:00
Vijay Dev
ee20be7c33 Merge branch 'master' of github.com:lifo/docrails 2012-07-07 20:44:49 +05:30
Carlos Antonio da Silva
ea7b48b074 Use "instance_accessor" for flash types class attribute 2012-07-07 09:16:48 -03:00
kennyj
238a4253bf Added support add_flash_types 2012-07-07 17:07:57 +09:00
kennyj
1498071b92 Remove unused code. 2012-07-07 14:59:49 +09:00
Mircea Pricop
021f3d24f3 Prevent conflict between mime types and Object methods
Assuming the type ":touch", Collector.new was calling
send(:touch), which instead of triggering method_missing
and generating a new collector method, actually
invoked the private method `touch` inherited from
Object.

By generating the method for each mime type as it
is registered, the private methods on Object can
never be reached by `send`, because the `Collector`
will have them before `send` is called on it.

To do this, a callback mechanism was added to Mime::Type

This allows someone to add a callback for whenever
a new mime type is registered. The callback then
gets called with the new mime as a parameter.

This is then used in AbstractController::Collector
to generate new collector methods after each mime
is registered.
2012-07-06 20:38:23 +02:00
Aaron Patterson
a5efd5800c Revert "push parameter instantiation to one method"
This reverts commit 9669f6f7883787aa209207cab68b1069636aed9e.

This breaks Sam Ruby's tests for some reason.  Revert until we figure it
out.
2012-07-05 15:46:14 -07:00
Aaron Patterson
a7826bd8b7 Merge branch 'master' into testclean
* master:
  Add documentation for inheritance_column method
  Use ArgumentError vs. RuntimeError, which is more precise.
  CSV fixtures aren't supported by default anymore, update generated test_helper.rb to reflect that
  fix quoting for ActiveSupport::Duration instances
  Add few information on the field types
  Add the options method to action_controller testcase.
2012-07-05 14:03:57 -07:00
François de Metz
0303c2325f Add the options method to action_controller testcase.
Signed-off-by: François de Metz <francois@stormz.me>
2012-07-04 15:00:00 +02:00
Aaron Patterson
9669f6f788 push parameter instantiation to one method 2012-07-03 18:01:11 -07:00
Aaron Patterson
7ef6a27f89 add Mime.fetch so we can have default mime types 2012-07-03 17:51:27 -07:00
Aaron Patterson
142d50e52e make the default environment have actual defaults
instead of deleting keys on every instantiation, create defaults we
actually use.  eventually we can pass an environment in to the request,
and create a new req / res object on each call.
2012-07-03 17:37:47 -07:00
Aaron Patterson
5ee27630f7 assing the request on the response only once 2012-07-03 17:29:46 -07:00
Aaron Patterson
4f2cd3e9fe group things that are alike 2012-07-03 17:18:31 -07:00
Aaron Patterson
9f4dafb8ef push functional test specific methods to it's own module 2012-07-03 17:13:04 -07:00
Aaron Patterson
b5442b5a3a test should be testing to_param not to_s, remove Array subclass 2012-07-03 16:35:07 -07:00
Aaron Patterson
e136fbd7fa push the cookie writing stuff out of the controller
merging cookies is responsibility of the test runner
2012-07-03 14:59:32 -07:00
Aaron Patterson
4528cd0f43 extend the controller with special logic on recycle
For some reason, this special logic is only supposed to be executed on
the second request.  For now, we'll extend on recycle, but we should
figure out why this functionality can't be run on every request
2012-07-03 14:59:31 -07:00
Aaron Patterson
9eef9333bd push req / res setting to the test runner
Try to avoid making the controller mutate itself so that we can
eventually make the response async
2012-07-03 14:59:31 -07:00
Aaron Patterson
46eba6c30f extract response setting to a method 2012-07-03 14:59:31 -07:00
Carlos Antonio da Silva
215d41d802 Update 4.0 Release Notes with changelogs [ci skip]
Also fix some wrong formatting.

Related discussion:
ab72040b74 (commitcomment-1525256)
2012-07-02 22:34:51 -03:00
Aaron Patterson
b8a5bb2c5e push response creation down since third param is never used. 2012-07-02 11:41:28 -07:00
Nick Howard
167a0b9e83 ActionDispatch::ClosedError no longer is raised. See d142572567 for more info. 2012-06-30 16:04:08 -06:00
Nick Howard
0d400ae5b9 use config.action_controller instead of ActionController::Base in example code for asset_tag_helper 2012-06-30 16:01:57 -06:00
Carlos Antonio da Silva
ab72040b74 Update AR and AP changelogs [ci skip] 2012-06-30 16:31:40 -03:00
Carlos Antonio da Silva
49d069d797 Merge pull request #6904 from guilleiguaran/remove-amo-dependency-in-ap
Remove Active Model dependency from Action Pack
2012-06-30 12:16:17 -07:00
José Valim
350e9c6c17 Merge pull request #6908 from apotonick/av-prepare2
Av prepare2
2012-06-30 09:37:36 -07:00
Guillermo Iguaran
166dbaa752 Remove ActiveModel dependency from ActionPack
ActiveModel is used in ActionPack for ActiveModel::Naming for a few,
mostly optional aspects of ActionPack related to automatically converting
an ActiveModel compliant object into a key for params and routing. It uses
only three methods of ActiveModel (ActiveModel::Naming.route_key,
ActiveModel::Naming.singular_route_key and ActiveModel::Naming.param_key).
2012-06-30 11:04:31 -05:00
Rafael Mendonça França
7406d69ecc Remove more tests related to draw external routes files
Related with 5e7d6bba79393de0279917f93b82f3b7b176f4b5
2012-06-29 14:33:09 -03:00
José Valim
5e7d6bba79 Revert "Allow loading external route files from the router"
This reverts commit 6acebb38bc0637bc05c19d87f8767f16ce79189b.

Usage of this feature did not reveal any improvement in existing apps.

Conflicts:

	actionpack/lib/action_dispatch/routing/mapper.rb
	guides/source/routing.textile
	railties/lib/rails/engine.rb
	railties/lib/rails/paths.rb
	railties/test/paths_test.rb
2012-06-29 17:44:10 +02:00
Nick Sutterer
67dd94a774 removing the AV::Base.helpers class attribute as it is not needed. 2012-06-29 13:02:44 +02:00
Nick Sutterer
1b01ab4959 remove AV.prepare and move all helper-related logic into the controller. this decouples the view since it no longer knows about routes internals.
this is a result of an ongoing discussion at https://github.com/rails/rails/pull/6826.
2012-06-29 11:33:37 +02:00
Rafael Mendonça França
99e10ebd5d Remove file added by mistake at 88230b7cf77181c2088cce3314493caa9b3ac1fb 2012-06-26 10:48:13 -03:00
José Valim
cfd21f0147 Merge pull request #6859 from bogdan/deprecate_monkey_patch
AS::Callbacks: deprecate monkey patch code
2012-06-26 01:30:15 -07:00
Bogdan Gusiev
88230b7cf7 AS::Callbacks: deprecate monkey patch code
Deprecate usage of filter object with #before and #after
methods as around callback
2012-06-26 09:21:36 +03:00
Akira Matsuda
38f7ebabb9 :update_details method no more exists on @lookup_context
the method has gone in this commit: 119e9e2dafb0cdc5b85613b730333679aef534af
2012-06-26 14:27:44 +09:00
Carlos Antonio da Silva
dc766c9e7b Move number helper i18n related tests to AS
They also make more sense here since all the related logic with I18n is
handled by AS::NumberHelper, and not by AV anymore.
2012-06-24 19:30:06 -03:00
Carlos Antonio da Silva
feec54b781 Refactor AV number helper tests with invalid numbers
Just make use of the returning exception from assert_raise, instead of
calling the method again with a rescue clause to test the saved
exception number.
2012-06-24 19:30:05 -03:00
Carlos Antonio da Silva
77b89c2935 Do not propagate the :raise option to AS number helpers
ActiveSupport::NumberHelper does not make use of :raise, so there's no
need to propagate it down.
2012-06-24 19:30:05 -03:00
Carlos Antonio da Silva
ebe8a45444 Merge pull request #6805 from tim-vandecasteele/uploadedfile-paramify
Don't paramify ActionDispatch::Http::UploadedFile in tests
2012-06-23 13:06:12 -07:00
Aaron Patterson
e1838bfcb8 eliminating another string subclass 2012-06-22 17:11:57 -07:00
Aaron Patterson
03e9a6417d fix some accidental nils 2012-06-22 16:22:09 -07:00
Francesco Rodriguez
bc7ac33846 add :nodoc: to internal implementations [ci skip] 2012-06-22 16:29:59 -05:00
Vijay Dev
35ee8fa3d8 Merge branch 'master' of github.com:lifo/docrails 2012-06-22 22:15:27 +05:30
Vijay Dev
6285675db1 fixes a few mistakes in api docs [ci skip] 2012-06-22 22:14:29 +05:30
Tim Vandecasteele
8471edc672 Don't paramify ActionDispatch::Http::UploadedFile in tests
To test uploading a file without using fixture_file_upload, a posted
ActionDispatch::Http::UploadedFile should not be paramified (just like
Rack::Test::UploadedFile).
(Rack::Test::UploadedFile and ActionDispatch::Http::UploadedFile don't
share the same API, tempfile is not accessible on
Rack::Test::UploadedFile as discussed in
https://github.com/brynary/rack-test/issues/30)
2012-06-22 09:27:41 +02:00
Aaron Patterson
6d71080530 use mutex_m rather than use a delegate system 2012-06-21 13:54:14 -07:00
Yehuda Katz
a010fc1800 Merge pull request #6428 from pinetops/resolver_concurrency_fix
Make the Resolver template cache threadsafe
2012-06-21 13:47:18 -07:00