Piotr Sarnacki
b3eb26a161
Removed deprecated RouteSet API, still many tests fail
2010-09-05 13:44:36 +02:00
José Valim
ba52748d05
Remove deprecated support to <% form_for %> and several ActionController::Base methods.
2010-08-29 21:08:14 -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
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
Alan Harper
566967eaf3
Missing method error doesn't specify which controller it is missing from [ #4436 state:resolved]
...
The error page shown when the method you are requesting on a controller
doesn't specify which controller the method is missing from
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-06-10 20:04:37 +02:00
Rizwan Reza
167017f655
Tests method_missing to raise NameError. [ #2522 state:resolved]
...
Signed-off-by: wycats <wycats@gmail.com>
2010-03-27 00:26:44 -07:00
José Valim
13bb4a6e68
Current url helpers become actions in controller. Added a failing test case for it.
2010-03-22 23:57:06 +01:00
Justin Ko
ea4f8ef33f
Reinstate dom_id in controllers.
...
[#3040 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2010-03-09 10:49:36 -08:00
Jeremy Kemper
c507e16dba
Reinstate default_url_options and remove url_options= writer
2010-03-08 21:40:45 -08:00
Carlhuda
47fe14bfcc
Silence test deprecation warnings
2010-02-26 15:34:12 -08:00
José Valim
bd36418c51
Fix controller_path returnsing an empty string in Ruby 1.8.7 [ #4036 status:resolved]
2010-02-26 11:51:21 +01:00
Carlhuda
36fd9efb5e
Continued effort to deglobalize the router
2010-02-25 17:53:01 -08:00
Carlhuda
226dfc2681
WIP: Remove the global router
2010-02-25 17:53:00 -08:00
José Valim
fc4f237864
Make filter parameters based on request, so they can be modified for anything in the middleware stack.
2010-01-21 16:52:49 +01:00
José Valim
3b631df101
Ensure that segments in default_url_options also work with format specified.
2010-01-07 17:17:06 +01:00
José Valim
f149eb19d4
From now on, parameters defined in default_url_options can be absent from named routes.
...
This allows the following setup to work:
# app/controllers/application_controller.rb
class ApplicationController
def default_url_options(options=nil)
{ :locale => I18n.locale }
end
end
# From your views and controllers:
I18n.locale #=> :en
users_url #=> "/en/users"
users_url(:pl) #=> "/pl/users"
user_url(1) #=> "/en/users/1"
user_url(:pl, 1) #=> "/pl/users/1"
user_url(1, :locale => :pl) #=> "/pl/users/1"
If you provide all expected parameters, it still works as previously.
But if any parameter is missing, it tries to assign all possible ones
with the hash returned in default_url_options or the one passed straight
to the named route method.
Beware that default_url_options in ApplicationController is not shared
with ActionMailer, so you are required to always give the locale in your
email views.
2010-01-07 15:34:14 +01:00
José Valim
f564f947d9
Remove duplicated url_for code and move methods shared between ActionMailer and ActionController up to AbstractController.
2010-01-07 15:31:50 +01:00
José Valim
75ba102a80
Remove ActionView inline logging to ActiveSupport::Notifications and create ActionController::Base#log_event, so everything can be logged within one listener. Also expose log_process_action as a hook for different modules to include their own information during the action processing. This allow ActiveRecord to hook and any other ORM. Finally, this commit changes 'Processing' and 'Rendering' in logs to 'Processed' and 'Rendered' because at the point it's logged, everying already happened.
2009-12-26 20:28:53 +01:00
Joshua Peek
2be5e088d2
Use new routing dsl in tests
2009-12-08 16:52:26 -06:00
Joshua Peek
a5c82a9dfb
Start rewriting some internal tests to use the new routing dsl
2009-10-20 16:03:55 -05:00
Joshua Peek
24ad9ae3d2
Cleanup route reloading in tests. Prefer with_routing over using ActionController::Routing::Routes directly
2009-08-16 21:14:26 -05:00
Yehuda Katz + Carl Lerche
65102c8f1a
Cleaning up more tests and code that needed to work in both old and new base
2009-06-17 16:51:51 -07:00
Yehuda Katz + Carl Lerche
47ff57f6d1
Document and clean up HideActions and Http
2009-06-10 15:27:53 -07:00
Yehuda Katz + Carl Lerche
da65320433
Got new base to pass controller/base_test.rb, implemented method_missing action semantics in compatibility mode, and fixed a few action_missing bugs.
2009-05-14 17:25:10 -07:00
Jeremy Kemper
e8550ee032
Cherry-pick core extensions
2009-05-13 12:00:15 -07:00
Joshua Peek
11af089cee
Extract ActionController rescue templates into Rescue and ShowExceptions middleware.
...
This commit breaks all exception catching plugins like ExceptionNotifier. These plugins should be rewritten as middleware instead overriding Controller#rescue_action_in_public.
2009-05-02 23:02:22 -05:00
Yehuda Katz and Carl Lerche
1aadafda8d
Updated old AC::Base for small changes to AV
2009-04-08 17:33:41 -07:00
Jeremy Kemper
cf09fa74f7
Include process methods in ActionController::TestCase only. No need to alias_method_chain :process either.
2009-01-09 00:14:27 -08:00
Jeremy Kemper
c82e8e1f48
Move controller assertions from base TestCase to AC:: and AV::TestCase
2008-11-07 15:42:34 -05:00
Jeremy Kemper
a1eb4e11c2
Get rid of 'Object#send!'. It was originally added because it's in Ruby 1.9, but it has since been removed from 1.9.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Conflicts:
actionpack/test/controller/layout_test.rb
2008-08-31 13:20:15 -07:00
Ripta Pasay
f7fdbae770
Use fully-qualified controller name when logging. [ #600 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-07-17 01:33:44 +01:00
Luke Redpath
7650ff892c
Fix url_for with no arguments when default_url_options is not explicitly defined. [ #339 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-06-17 20:53:41 +01:00
rick
37599d16f2
regression test for bug introduced in [6a6b4392c16c665eb713705f2b38e959a658eeef] [Ian White] [ #22 state:resolved]
2008-05-05 23:42:52 -07:00
Cheah Chu Yeow
ee1d508a6b
Allow ActionController::Base#default_url_options to have a default options argument of nil.
...
This fixes a bug introduced in [6a6b4392c16c665eb713705f2b38e959a658eeef] which was breaking routing in ActionController::UrlWriter.
2008-05-05 23:41:33 -07:00
Cheah Chu Yeow
6a6b4392c1
Ensure that default_url_options, if defined, are used in named routes.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#22 state:resolved]
2008-05-04 12:49:44 +12:00
Jeremy Kemper
9d755f1983
require abstract_unit directly since test is in load path
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8564 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:06 +00:00
Jeremy Kemper
1bb208d7e5
Fixup mocha tests for 0.5.6. Closes #10602 [murphy, mikong]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8508 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-29 05:16:03 +00:00
Jeremy Kemper
0ee1cb2cd3
Ruby 1.9 compat, consistent load paths
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7719 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-02 05:32:14 +00:00
Jeremy Kemper
7fce529b2a
Mocha 0.4 mixes in more public instance methods, confusing controller identification of action methods. Closes #7347 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6030 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-24 12:04:08 +00:00
Jeremy Kemper
71dbef6d27
Integration tests: thoroughly test ActionController::Integration::Session. Closes #6022 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4954 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-03 23:34:57 +00:00
Nicholas Seckar
84bacf99d6
Invoke method_missing directly for hidden actions. Closes #3030 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4755 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-13 04:15:22 +00:00
Jeremy Kemper
12ab93b72b
Make controller_path available as an instance method. Closes #5724 .
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-05 01:56:58 +00:00
Marcel Molina
d17bd6a043
Make action caching aware of different formats for the same action so that, e.g. foo.xml is cached separately from foo.html. Implicitly set content type when reading in cached content with mime revealing extensions so the entire onous isn't on the webserver. PDI MORE CACHING TESTS [Marcel Molina Jr.]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4656 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-03 23:59:38 +00:00
Nicholas Seckar
26eaf073c4
Remove ::Controllers related cruft; fix AP tests
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3668 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-26 17:49:09 +00:00
Jeremy Kemper
22d9bad8a0
Expose the session model backing CGI::Session
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2696 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-10-20 21:59:48 +00:00
Jamis Buck
4fa9a2bfe2
Require 'pp' early to prevent the pretty-print methods being mixed in too late and messing up a test
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2277 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-20 13:55:27 +00:00
David Heinemeier Hansson
7f26415d3c
Optimized tag_options to not sort keys, which is no longer necessary when assert_dom_equal and friend is available #1995 [skae]. Added assert_dom_equal and assert_dom_not_equal to compare tags generated by the helpers in an order-indifferent manner #1995 [skae]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2271 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-20 07:54:55 +00:00
David Heinemeier Hansson
d985260ed7
Made base_tests.rb run as part of rake
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2243 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-15 05:20:32 +00:00