Thiago Pradi
3c9bf6e1dc
Exception handling more readable
...
[#5601 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-09-19 12:18:51 -07:00
Aaron Patterson
2d65ff5af7
removing some warnings
2010-09-18 14:14:46 -07:00
Maxim Chernyak
20685d07ab
Fix header capitalization by explicitly upcasing first letter of every word, and avoiding capitalize. [ #5636 state:resolved]
2010-09-18 20:49:51 +02:00
Xavier Noria
0207bc7cc9
get csrf_meta_tag back to the generated layout in deference to existing printed material, chomp also the generated HTML to be faithful to the output before the refactor
2010-09-14 01:35:44 +02:00
Collin Miller
96650f704a
added block arguments to ActionController::Metal#use
...
Useful for cases such as warden, where a block configuration is taken.
class SomeController < ApplicationController
use RailsWarden::Manager do |manager|
manager.default_strategies :facebook_oauth
manager.failure_app = SomeController.action(:authorize)
end
end
2010-09-12 07:35:54 +08:00
Xavier Noria
a87b92db7b
revises implementation and documentation of csrf_meta_tags, and aliases csrf_meta_tag to it for backwards compatibilty
2010-09-11 11:05:00 +02:00
Carlos Antonio da Silva
022fd876bb
Cleanup Action Dispatch assertions tests
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-06 13:42:11 +02:00
Carlos Antonio da Silva
9532d746a9
Cleanup deprecations in Action Dispatch
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-06 13:41:12 +02:00
Carlos Antonio da Silva
11fccc5f06
Cleanup deprecation warnings in Action Controller
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-06 13:40:45 +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
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
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
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
Ł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
Piotr Sarnacki
b3eb26a161
Removed deprecated RouteSet API, still many tests fail
2010-09-05 13:44:36 +02:00
José Valim
599e46bf24
Revert "Setup explicit requires for files with exceptions. Removed them from autoloading."
...
Booting a new Rails application does not work after this commit [#5359 state:open]
This reverts commit 38a421b34d .
2010-09-02 21:11:03 +02:00
Łukasz Strzałkowski
38a421b34d
Setup explicit requires for files with exceptions. Removed them from autoloading.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-09-02 11:54:04 +02:00
José Valim
ba52748d05
Remove deprecated support to <% form_for %> and several ActionController::Base methods.
2010-08-29 21:08:14 -03:00
Jesse Storimer
730af48963
Ensure that inherited helper_methods are available after calling clear_helpers [ #5348 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-28 18:07:01 -03:00
José Valim
625f7b5a5b
Be sure to call helper :all just on direct children. (Tests by Jesse Storimer)
2010-08-26 18:20:22 -03:00
Andrew White
11f6179f55
Reset symbolized path parameters when a test request is recycled [ #5437 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-24 11:24:32 -03:00
Santiago Pastorino
bb75c33754
Config is deprecated on 1.8.8 and 1.9.3 use RbConfig
2010-08-23 23:10:36 -03:00
Andrew White
7c9bf45b0d
Support routing constraints in functional tests
...
Extend assert_recognizes and assert_generates to support passing
full urls as the path argument. This allows testing of routing
constraints such as subdomain and host within functional tests.
[#5005 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-08-20 14:51:25 -03:00
Xavier Noria
fb6b805620
code gardening: we have assert_(nil|blank|present), more concise, with better default failure messages - let's use them
2010-08-17 03:32:11 +02:00
Santiago Pastorino
ad4272922d
object/try should be required after abstract_unit to have AS in the load path
2010-08-14 18:33:38 -03:00
Santiago Pastorino
b451de0d6d
Deletes trailing whitespaces (over text files only find * -type f -exec sed 's/[ \t]*$//' -i {} \;)
2010-08-14 04:12:33 -03:00
Xavier Noria
4f7565c4de
adds missing requires for Object#try
2010-08-09 15:25:21 +02:00
Santiago Pastorino
111234e7c1
Use AS::OrderedHash when trusting in the order of the hash
2010-08-01 21:56:06 -03:00
Brian Rose
622092d33e
Fixed a globbed route issue where slashes were being escaped, causing assert_routing to fail. [ #5135 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-21 22:07:40 +02:00
Piotr Sarnacki
6807b08099
Moved a few methods from RecordIdentifier to ActiveModel::Naming
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-21 11:29:58 +02:00
José Valim
c3c349ec3e
Remove assert_valid. It was already deprecated on Rails 2.3.
2010-07-19 22:35:17 +02:00
Neeraj Singh
33c5689e2d
Exceptions from views should be rescued based on the original exception. If a handler for original exception is missing then apply ActiveView::TemplateError
...
[#2034 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-19 14:50:38 +02:00
Jeremy Kemper
81f398b804
Fix setting helpers_path to a string or pathname
2010-07-07 12:03:08 -07:00
Patrik Stenmark
7f7480f6fc
Adds tests for content negotiation change introduced in dc5300adb6
...
Signed-off-by: wycats <wycats@gmail.com >
2010-07-04 11:17:16 -07:00
Piotr Sarnacki
f7ba614c2d
Unify routes naming by renaming router to routes
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-02 01:51:03 +02:00
Santiago Pastorino
824da60ae8
Move Rails module to abstract_unit to make test in isolation work
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-28 01:26:07 +02:00
Andrew White
bba19603c2
URL fragments should not have safe characters escaped. Ref: Appendix A, http://tools.ietf.org/rfc/rfc3986.txt
...
[#4762 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-06-25 18:05:40 -07:00
José Valim
a12b76b09e
Just reading flash messages should not create a session if one does not exist yet.
2010-06-25 09:36:26 +02:00
José Valim
6788db824a
Move Rails::LogSubscriber to ActiveSupport::LogSubscriber, allowing frameworks like ActiveRecord and ActiveResource to log outsude Rails::Application [ #4816 state:resolved]
2010-06-24 13:23:43 +02:00
knapo
995b1a243c
Fix controller_name for non default controller paths [ #4901 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-23 01:37:52 +02:00