José Valim
654df86b7b
Show detailed exceptions no longer returns true if the request is local in production.
2011-12-16 10:45:59 +01:00
José Valim
deef8dd682
Extract the rendering of public exceptions pages into a Rack app.
2011-12-16 10:45:59 +01:00
José Valim
d142572567
Get rid of the close checks since we cannot reliably close the session anyway.
2011-12-16 10:45:59 +01:00
Xavier Noria
5e0dec5e10
it's -> its
2011-12-15 12:57:33 -08:00
José Valim
26e7400cc5
Fix diagnostics page for routing errors.
2011-12-15 19:43:49 +01:00
choonkeat
5f67cfeda1
Fix url_for options[:subdomain] to allow objects as values
...
* e.g. blog_url(subdomain: current_user) instead of blog_url(subdomain: current_user.to_param)
2011-12-14 22:43:42 +08:00
José Valim
d4d99bbc87
Fix another regression related to the layout optimization.
2011-12-08 22:56:50 +01:00
José Valim
ebd71fd0e3
Fix a regression and also fix broken test.
2011-12-08 21:00:34 +01:00
kennyj
3ade2f8e89
Fix warning for params_wrapper_test.
2011-12-08 23:09:09 +09:00
Jean-Francois Turcot
d5526218e4
ParamsWrapper only wrap the accessible attributes when they were set
2011-12-07 22:50:01 -05:00
Prem Sichanugrist
0460b3a469
Fix bug in assert_template when using only :layout option
...
Currently if you're do this:
assert_template :layout => "foo"
Regardless of what layout you were using, the test will always pass. This was broken since the introduction of :layout option in [d9375f3f ].
We have a lot of test cases in actionpack/test/controller/layout_test.rb that use this feature. This will make sure that those test cases are not true negative.
2011-12-06 21:15:27 -05:00
Thomas von Deyen
0da31a1839
Allowing string as url argument for expire_action
2011-12-06 13:05:15 +01:00
José Valim
f6cc4fd7a2
Merge pull request #3861 from andyjeffries/master
...
Named Routes shouldn't override existing ones (currently route recognition goes with the earliest match, named routes use the latest match)
2011-12-05 08:48:25 -08:00
lest
1f0e21ce30
use classify in ParamsWrapper to derive model name from controller name
2011-12-05 19:15:36 +03:00
Andy Jeffries
71d769e3b5
Named Routes shouldn't override existing ones (currently route recognition goes with the earliest match, named routes use the latest match)
2011-12-05 15:41:38 +00:00
Overbryd
e31c4ace97
Fix for redirect_to to respect urls with a network path reference like "//asset.host.com/resources/1235" see issue #3856
2011-12-05 11:19:48 +01:00
José Valim
07f90f6bec
Merge branch 'exceptions' with the following features:
...
* A Railtie API for registering new exceptions and their respective status code (check Active Record railtie for an example)
* Extraction of ShowExceptions middleware logging and debugging features into a middleware called DebugExceptions
Conflicts:
actionpack/CHANGELOG.md
2011-12-01 21:18:47 +01:00
José Valim
750bb5c865
Split ShowExceptions responsibilities in two middlewares.
2011-12-01 20:46:18 +01:00
David Heinemeier Hansson
83d29a283c
Revert "Added ActiveRecord::Base#last_modified to work with the new fresh_when/stale? conditional get methods from Action Pack"
...
Needless indirection with no added value.
This reverts commit 535853e83b .
2011-12-01 20:45:47 +01:00
David Heinemeier Hansson
535853e83b
Added ActiveRecord::Base#last_modified to work with the new fresh_when/stale? conditional get methods from Action Pack
2011-12-01 19:47:14 +01:00
David Heinemeier Hansson
218c272938
Allow fresh_when/stale? to take a record instead of an options hash [DHH]
2011-12-01 19:16:10 +01:00
lest
565d92f578
fix method redefined warnings in tests
2011-11-30 18:57:12 +03:00
José Valim
38ab982cff
Log 'Filter chain halted as CALLBACKNAME rendered or redirected' every time a before callback halts.
2011-11-30 09:53:09 +01:00
José Valim
0a4035b12a
Revert the serializers API as other alternatives are now also under discussion
2011-11-25 19:29:39 +00:00
José Valim
fcacc6986a
Merge branch 'serializers'
...
This implements the ActiveModel::Serializer object. Includes code, tests, generators and guides.
From José and Yehuda with love.
Conflicts:
railties/CHANGELOG.md
2011-11-25 09:59:35 +00:00
José Valim
7fcc8c0a1f
Rely solely on active_model_serializer and remove the fancy constant lookup.
2011-11-23 23:45:27 +00:00
José Valim
e62de52aa3
Merge branch 'master' into serializers
2011-11-23 20:43:06 +00:00
kennyj
453f5534b4
Warnings removed. (ambiguous first argument)
2011-11-24 00:10:34 +09:00
lest
5bcd119b8d
move show_detailed_exceptions? to Rescue module
2011-11-22 13:34:13 +03:00
lest
c6d6b28bb4
refactor show exceptions tests
2011-11-22 11:38:55 +03:00
José Valim
d2cfa982fd
Merge pull request #3581 from amatsuda/metal_response_body_19
...
AC::Metal#response_body= stores different value in Ruby 1.8 and 1.9
2011-11-10 00:49:14 -08:00
Akira Matsuda
be7ab83b64
A test case to ensure that AC::Metal#response_body= always wraps the given value in an Array in both Ruby 1.8 and 1.9 (refs #3581 )
2011-11-10 10:54:56 +09:00
Bradford Folkens
bd559b0068
Fix trouble using :subdomain in development environment when using numeric addresses.
...
See-also pull request #3561 from 3-1-stable
Otherwise the following occurs:
TypeError: can't convert nil into String
/Users/bfolkens/dev/bfolkens-rails-core/actionpack/lib/action_dispatch/http/url.rb:75:in host_or_subdomain_and_domain'
/Users/bfolkens/dev/bfolkens-rails-core/actionpack/lib/action_dispatch/http/url.rb:37:in url_for'
/Users/bfolkens/dev/bfolkens-rails-core/actionpack/lib/action_dispatch/routing/url_for.rb:147:in test_subdomain_may_be_accepted_with_numeric_host'
/Users/bfolkens/dev/bfolkens-rails-core/activesupport/lib/active_support/testing/setup_and_teardown.rb:67:in run'
/Users/bfolkens/dev/bfolkens-rails-core/activesupport/lib/active_support/callbacks.rb:426:in send'
/Users/bfolkens/dev/bfolkens-rails-core/activesupport/lib/active_support/callbacks.rb:81:in run'
2011-11-08 07:52:35 -06:00
Christopher Meiklejohn
6cbe4223a7
Ensure that the format isn't applied twice to the cache key, else it becomes impossible to target with expire_action.
2011-10-31 15:10:07 -04:00
José Valim
80768b739e
Responders now return 204 No Content for API requests without a response body (as in the new scaffold)
2011-10-26 09:31:56 +02:00
Arun Agrawal
244dcfea47
ActionPack test fix for RBX
2011-10-24 14:11:20 +05:30
Jose and Yehuda
8ff7693a8d
Initial commit of serializer support
2011-10-15 18:40:37 +02:00
Jeremy Kemper
bceec4c3c3
/ is allowed in URI fragments
2011-10-13 21:41:30 -07:00
Santiago Pastorino
8f11d53506
Merge pull request #2219 from kommen/fix_fragment_caching_squashed
...
Fix fragment caching (squashed commits)
2011-10-13 13:36:20 -07:00
Alexey Vakhov
50d262f52a
Support symbol and string actions in AC#respond_to options
2011-10-11 12:48:03 +04:00
Denis Odorcic
a0a68ecbb2
JSON responder should return errors with :error root
2011-10-10 01:42:12 -04:00
Ben Scheirman
d68f27e9b1
accept optional :host parameter to force_ssl
2011-10-08 18:38:02 -05:00
Kamil Sobieraj
de942e5534
:subdomain can now be specified with a value of false in url_for, allowing for subdomain(s) removal from the host during link generation. Closes #2025
2011-10-04 09:16:34 +01:00
Alexey Vakhov
8e946daf69
normalize arg for AC::TestCase tests class method
2011-10-03 12:12:07 +04:00
José Valim
6e8fe1bf02
TestCase should respect the view_assigns API instead of pulling variables on its own.
2011-10-02 11:29:13 +02:00
Santiago Pastorino
3de95fd930
Revert "Make process reuse the env var passed as argument"
...
This reverts commit 0e4748cd41 .
2011-09-24 17:19:42 -03:00
José Valim
43d27e9105
Deprecate passing the template handler in the template name.
...
For example, calling hello.erb is now deprecated. Since Rails 3.0
passing the handler had no effect whatsover. This commit simply
deprecates such cases so we can clean up the code in later releases.
2011-09-22 15:37:38 +02:00
José Valim
119e9e2daf
Get rid of update_details in favor of passing details to find_template.
2011-09-22 15:03:05 +02:00
Aaron Patterson
a08bee7841
all routes can be stored in the Journey Routes object
2011-09-12 16:50:48 -07:00
Mike Dillon
dbef311819
Use ensure instead of rescue
2011-09-10 11:01:22 -07:00