Commit Graph

6375 Commits

Author SHA1 Message Date
Aaron Patterson
839e2f9664 cleaning up more crazy! 2010-10-04 20:00:55 -07:00
Aaron Patterson
714fea4540 deleting more crazy 2010-10-04 19:52:17 -07:00
Aaron Patterson
333a5659e8 dry up some crazy codes 2010-10-04 19:46:38 -07:00
Aaron Patterson
5769636663 fixing a few test warnings 2010-10-04 19:32:49 -07:00
Aaron Patterson
1217339616 only forwarding enough methods to work. People should grab the delegate tempfile if they really need to do hard work 2010-10-04 19:28:40 -07:00
Aaron Patterson
3370ad0b1e making sure respond_to? works properly 2010-10-04 17:11:50 -07:00
Aaron Patterson
8a97470210 raising an argument error if tempfile is not provided 2010-10-04 17:08:25 -07:00
Aaron Patterson
876acf001a if it walks like a duck and talks like a duck, it must be a duck 2010-10-04 16:57:11 -07:00
Aaron Patterson
2a3022db7f delegate to the @tempfile instance variable 2010-10-04 16:56:45 -07:00
Aaron Patterson
f9734f2b0f adding tests for uploaded file 2010-10-04 16:30:16 -07:00
Aaron Patterson
28bb1885f5 avoid method call to compact 2010-10-04 16:08:01 -07:00
John Firebaugh
b1047888fb render :text => proc { ... } is no longer supported. 2010-10-04 11:14:42 -07:00
John Firebaugh
6644675831 Template::Error is also used if rendering fails. 2010-10-04 11:12:57 -07:00
José Valim
0b51f3cc73 Ensure the proper content type is returned for static files. 2010-10-04 18:06:04 +02:00
José Valim
3986fcb935 Initialize sid should just skip instance variables. 2010-10-04 08:47:36 +02:00
Aaron Patterson
a6c42c8267 two argument String#slice is faster than single argument, also avoid creating a Range object 2010-10-03 15:38:17 -07:00
Aaron Patterson
18a7b767e8 moving fake model to the correct file 2010-10-03 14:40:06 -07:00
José Valim
653acac069 Solve some warnings and a failing test. 2010-10-03 21:45:30 +02:00
José Valim
74dd8a3681 Move ETag and ConditionalGet logic from AD::Response to the middleware stack. 2010-10-03 21:25:22 +02:00
José Valim
50215f9525 Rely on Rack::Session stores API for more compatibility across the Ruby world. 2010-10-03 21:24:22 +02:00
Santiago Pastorino
c28bebef13 PERF: Hash[] + map is faster than this silly inject, and var[1..-1] is faster than var.sub('@', '') 2010-10-03 13:34:34 -02:00
David Chelimsky
f656796d05 Rename _assigns to view_assigns in AV::TC
- also add tests
- also deprecate _assigns

[#5751 state:resolved]

Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-10-03 13:30:31 -02:00
Aditya Sanghi
297cf0b266 added test for form_for with search_field
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-10-02 17:48:12 +02:00
Aditya Sanghi
8d1df887d3 Fixing search_field to remove object attribute from options hash [#5730 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-10-02 17:48:11 +02:00
José Valim
b951522018 Revert "Perf: refactor _assign method to avoid inject and defining unneeded local var."
_assigns must return a hash.

This reverts commit e66c1cee86aba1c81152f3d0872313e65cec85a9.
2010-10-02 08:36:55 +02:00
Aaron Patterson
3eb7f9adee removing more duplicate code. :'( 2010-10-01 18:09:37 -07:00
Aaron Patterson
50cf5c11a1 fixing warnings with regexps on assert_match 2010-10-01 18:07:19 -07:00
Aaron Patterson
ffbcb84c21 removing more duplicate code 2010-10-01 18:05:59 -07:00
Aaron Patterson
44f85678e9 delete repeated code 2010-10-01 18:01:34 -07:00
Aaron Patterson
dfa331ae15 use a method that actually exists 2010-10-01 17:54:50 -07:00
Aaron Patterson
ff2fdcc52b removing AS::Testing::Default in favor of just undefing default_test 2010-10-01 17:22:42 -07:00
José Valim
6a55ca346e Revert "removing crazy finalizer code until there is proof that we need it"
This reverts commit a40e3c1a9604ab3737ad2465c8f6a6db0fe0cc78.
2010-09-30 11:41:53 +02:00
Piotr Sarnacki
ec5d846ac6 Properly reload routes defined in class definition
Sometimes it's easier to define routes inside Engine or
Application class definition (e.g. one file applications). The
problem with such case is that if there is a plugin that
has config/routes.rb file, it will trigger routes reload on application.
Since routes definition for application is not in config/routes.rb
file routes_reloader will fail to reload application's routes
properly. With this commit you can pass routes definition as a block
to routes method, which will allow to properly reload it:

class MyApp::Application < Rails::Application
  routes do
    resources :users
  end
end
2010-09-30 09:47:05 +02:00
Piotr Sarnacki
22b11a41cc Allow mounting engines at '/'
Without that commit script_name always become '/', which
results in paths like //posts/1 instead of /posts/1
2010-09-30 09:47:05 +02:00
José Valim
69f97f4697 Use .find here as it is simpler and faster. 2010-09-30 07:25:06 +02:00
Aaron Patterson
31752f3516 avoid creating a block if possible 2010-09-29 18:32:51 -07:00
Aaron Patterson
7e057d11aa fixing regexp warnings 2010-09-29 18:23:33 -07:00
Aaron Patterson
29c32e8329 tag value can be false, so nil? check is necessary 2010-09-29 17:57:39 -07:00
Neeraj Singh
618407db56 another case of extra nil? check 2010-09-30 08:11:35 +08:00
Neeraj Singh
08a08d97dd no need to check for nil? 2010-09-30 08:11:35 +08:00
Neeraj Singh
692f5184c4 no need to check for nil? 2010-09-30 08:11:34 +08:00
Neeraj Singh
8efdffeda3 no need of nil check 2010-09-30 08:11:34 +08:00
Aaron Patterson
a40e3c1a96 removing crazy finalizer code until there is proof that we need it 2010-09-29 16:40:47 -07:00
Aaron Patterson
2eef53b163 removing useless code 2010-09-29 16:17:56 -07:00
Aaron Patterson
78ac9c2be7 dry up method checking in the request object 2010-09-29 16:09:58 -07:00
Aaron Patterson
ab0d216b67 reduce function calls on Array 2010-09-29 15:43:27 -07:00
Aaron Patterson
3f88f26d1e removing more lolinject 2010-09-29 15:41:06 -07:00
Aaron Patterson
2437356cda removing lollerject 2010-09-29 15:37:38 -07:00
Aaron Patterson
1d9a219307 oops, missed a uniq 2010-09-29 11:53:34 -07:00
Aaron Patterson
a5f8f59081 dry up action_methods 2010-09-29 11:47:54 -07:00
Aaron Patterson
1c0be7baac fixing space error 2010-09-29 11:47:54 -07:00
José Valim
d2ea2e1d5f Merge remote branch 'miloops/warnings' 2010-09-29 20:28:51 +02:00
Aaron Patterson
c57f5d58ea no need to call e.class 2010-09-29 10:39:17 -07:00
Emilio Tagua
6371e5b99f We can't assign @view_context_class here, define super() in test instead if we want to avoid warnings. 2010-09-29 14:35:24 -03:00
José Valim
258f7b586e Fix a small typo (ht: masterkain) 2010-09-29 10:34:37 -07:00
Emilio Tagua
c37800aae1 _ is not a valid scheme name character, \w includes it and also is redundant with \d.
'The scheme name consists of a letter followed by any combination of letters, digits, and the plus ("+"), period ("."), or hyphen ("-") characters; and is terminated by a colon (":").'
2010-09-29 12:55:43 -03:00
Emilio Tagua
8823b85010 Remove redundant conditional. 2010-09-29 12:42:51 -03:00
Emilio Tagua
152580ee00 Don't try to interpolate string if there's no interpolation point at all. 2010-09-29 12:42:51 -03:00
Emilio Tagua
bc0e7f4e37 Test correct method behaviour. 2010-09-29 12:42:51 -03:00
Emilio Tagua
6268815779 Initialize @view_context_class and cache view_context_class value. 2010-09-29 12:42:23 -03:00
José Valim
f63d35fba5 Ensure that named routes do not overwrite previously defined routes. 2010-09-29 14:24:32 +02:00
José Valim
b1ae796284 Fix an error on 1.8.7. 2010-09-29 11:28:38 +02:00
José Valim
392df0fc06 @_etag is not used anywhere. 2010-09-29 11:19:22 +02:00
José Valim
14f9904e0f Avoid (@_var ||= nil) pattern by using initialize methods and ensuring everyone calls super as expected. 2010-09-29 11:18:31 +02:00
José Valim
0bbf9029e8 Merge remote branch 'miloops/warnings' 2010-09-29 10:04:42 +02:00
Emilio Tagua
17599abc9c Enable warnings now that they can be readed. 2010-09-28 18:50:46 -03:00
Emilio Tagua
623ef13b77 Fix test that wasn't running at all. 2010-09-28 18:48:58 -03:00
Emilio Tagua
d5bb640eb0 Remove methods to avoid warnings. 2010-09-28 18:40:38 -03:00
Emilio Tagua
783e9b8de5 Change test to avoid warnings. 2010-09-28 18:38:25 -03:00
Emilio Tagua
34fc109549 Redefine duplicated test name. 2010-09-28 18:36:45 -03:00
Emilio Tagua
454960d9fb Redefine duplicated test name. 2010-09-28 18:35:02 -03:00
Emilio Tagua
3e336f9ab7 Use redefine_method since baz is already defined. 2010-09-28 18:31:52 -03:00
Emilio Tagua
0c08d8bd75 Fix more warnings by defining variables and using instance_variable_defined? instead instance_variable_get. 2010-09-28 18:25:52 -03:00
Emilio Tagua
0fa9c5392e Define @_layout if it is not defined. 2010-09-28 18:25:24 -03:00
Emilio Tagua
357f59447d Initialize @path. 2010-09-28 18:20:54 -03:00
Emilio Tagua
e804104200 Use helper method here. 2010-09-28 18:16:26 -03:00
Emilio Tagua
a0f95a887e Silence warnings here, only setting Encoding.default_external for testing. 2010-09-28 18:11:57 -03:00
Emilio Tagua
d1e976da7f Silence warnings here, only setting Encoding.default_external for testing. 2010-09-28 18:10:32 -03:00
Emilio Tagua
523f98099d Remove more warnings on AP. 2010-09-28 18:01:48 -03:00
Emilio Tagua
ad2c21089e Define @title to avoid warnings. 2010-09-28 17:44:26 -03:00
Emilio Tagua
80a98e9b25 Use instance_variable_defined? instead instance_variable_get in tests. 2010-09-28 17:35:17 -03:00
Emilio Tagua
3abd0593a6 Initialize ivars in tests. 2010-09-28 17:32:18 -03:00
Emilio Tagua
c648a4cb94 Remove useless string line causing a warning. 2010-09-28 17:18:48 -03:00
Emilio Tagua
9917356d66 Remove more warnings by initializing variables in test. 2010-09-28 17:16:18 -03:00
Emilio Tagua
3f94b45262 Remove more warnings: no need to define attr_accessor if already exists. Initialize ivar. 2010-09-28 17:08:43 -03:00
Emilio Tagua
19d9fffb9b Use redefine_method instead define_method, it may be already defined. 2010-09-28 17:08:10 -03:00
Emilio Tagua
c8db1adc0d Remove duplicated class test. copy/paste fail? 2010-09-28 16:40:28 -03:00
Emilio Tagua
4d6e178f88 Remove method if exists, avoid calling Array#first so many times. 2010-09-28 16:31:21 -03:00
Emilio Tagua
da8f9ca432 Remove more warnings on variables. 2010-09-28 16:27:05 -03:00
Emilio Tagua
dc37bd778a Initialize @trusted_proxies. 2010-09-28 16:25:06 -03:00
Emilio Tagua
eea61a030e Initialize @compiled_at if it is not. 2010-09-28 16:24:42 -03:00
Emilio Tagua
6286b63f27 Remove warings from rescues: don't define more than once debug_hash method and ask if @response if defined. 2010-09-28 16:20:48 -03:00
Emilio Tagua
540e87256d Remove remaining warnings on _trace by adding parenthesis to gsub arguments. 2010-09-28 16:12:07 -03:00
Emilio Tagua
c9416546a2 Use parenthesis to avoid ambiguous first argument warning. 2010-09-28 16:09:31 -03:00
Emilio Tagua
7129dd95d0 undef method if already defined. 2010-09-28 16:08:00 -03:00
Emilio Tagua
dda3431942 Remove useless use of :: in void context. 2010-09-28 16:02:31 -03:00
Emilio Tagua
7c8b43ed4f Ask if the instance variable is defined before asking for it, avoid *many* warnings. 2010-09-28 15:53:32 -03:00
Emilio Tagua
9027721b11 Add parenthesis to avoid syntax warnings. 2010-09-28 15:48:45 -03:00
Emilio Tagua
059d609a1a Avoid more uninitialized variable warnings. 2010-09-28 15:46:30 -03:00
Emilio Tagua
97174980e5 Remove duplicated method. 2010-09-28 15:43:03 -03:00
Emilio Tagua
04c4f47fed Initialize @sub_templates 2010-09-28 15:33:48 -03:00
Emilio Tagua
699fb81def Initialize @_virtual_path path ivar. 2010-09-28 15:31:29 -03:00
Emilio Tagua
dc2cd266cd Rename tests to avoid name collisions and warnings when running rake task. 2010-09-28 15:30:59 -03:00
Emilio Tagua
f63f90134a Rename duplicated test, and give it a correct name. Remove nonsense line. 2010-09-28 15:30:16 -03:00
Emilio Tagua
dc61ab0be5 Remove duplicated test. 2010-09-28 15:29:59 -03:00
Emilio Tagua
adcc5e11fe @selected may not be defined here, avoid warning. 2010-09-28 15:29:40 -03:00
Aaron Patterson
1ef2b47fb1 convert inject to map + join 2010-09-28 11:22:16 -07:00
Emilio Tagua
8ee27afd06 Don't define _test_case method if already defined. 2010-09-28 15:21:44 -03:00
Emilio Tagua
4bce8e3c75 No need to call super here. Use yield instead block.call 2010-09-28 15:10:55 -03:00
Emilio Tagua
b8c565fbd6 Initialize @app if it doesn't exists. 2010-09-28 15:10:15 -03:00
Emilio Tagua
71acc2737a Move uri parser to AS as URI.parser method to reuse it in AP and ARes. 2010-09-28 11:38:35 +08:00
Emilio Tagua
197a995bc5 Move uri parser to AS as URI.parser method to reuse it in AP and ARes. 2010-09-27 20:57:26 -03:00
José Valim
8aa86babad Fix tests on 1.9.2. 2010-09-28 00:39:29 +02:00
Diego Carrion
72f37bd8bc renderer calls object.to_json when rendering :json => object [#5655 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-27 23:11:29 +02:00
José Valim
dd83140b24 Properly initialize variables inside the initialize method. 2010-09-27 22:58:31 +02:00
Emilio Tagua
8adb24016d Define @_routes inside method, makes more sense and will be initialized when called anywhere.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-27 16:43:33 -03:00
Emilio Tagua
1ab2ab07b5 Remove more warnings shadowing outer local variable.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-27 16:43:17 -03:00
Emilio Tagua
2f326b7f27 Remove warning "URI.unescape is obsolete" from actionpack.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-27 16:43:04 -03:00
José Valim
8aa3684e07 Do not cache the script name outcome. 2010-09-27 21:14:18 +02:00
José Valim
fe0251e408 Merge remote branch 'miloops/warnings'
Conflicts:
	actionpack/lib/action_controller/metal/url_for.rb
2010-09-27 21:00:54 +02:00
José Valim
6067d16200 Call it compile_methods! and do the same on AM. 2010-09-27 20:43:56 +02:00
thedarkone
dc09cc055a Assume compute_asset_host returns reasonable values. 2010-09-27 17:46:00 +02:00
thedarkone
bb47927d91 Convert unless/else into if/else. 2010-09-27 17:46:00 +02:00
thedarkone
b127e0cac9 Performance: refactor convert_options_to_data_attributes. 2010-09-27 17:46:00 +02:00
thedarkone
dcabc6c043 Remove dead code. 2010-09-27 17:46:00 +02:00
thedarkone
7d9f605f80 Clean up url_for. 2010-09-27 17:45:59 +02:00
thedarkone
5b81d1f3ef Hash#empty? is faster than Enumerable#any? when used on a Hash. 2010-09-27 17:45:59 +02:00
thedarkone
70357666bc Do a single string interpolation. 2010-09-27 17:45:59 +02:00
thedarkone
e1bccc5169 Simple .empty? test will do fine here (rails_asset_id returns nice strings). 2010-09-27 17:45:59 +02:00
thedarkone
7cee1587f1 options[:action] is very likely to be nil. 2010-09-27 17:45:59 +02:00
thedarkone
e12e2fb4f6 Cache 2 of Request's commonly called methods. 2010-09-27 17:45:59 +02:00
thedarkone
8fdb34b237 Cache url_options on a per-request basis. 2010-09-27 17:45:59 +02:00
thedarkone
86bcccf8df No need to create a separate lambda for each call. 2010-09-27 17:45:59 +02:00
thedarkone
7b2d51817d Make asset extension rewriting faster. 2010-09-27 17:45:58 +02:00
thedarkone
05e53b4c1a Optimize relative_url_root rewriting code. 2010-09-27 17:45:58 +02:00
thedarkone
918dc27345 Compile ActionController::Base.config's methods to avoid method_missing overhead. 2010-09-27 17:45:58 +02:00
Emilio Tagua
50decfbc0e _routes must be inside @controller conditional. 2010-09-27 11:19:24 -03:00
Emilio Tagua
023c2020b3 Initialize @_routes if not defined yet, avoiding more warnings. 2010-09-27 11:19:24 -03:00
Emilio Tagua
bb71f182dd Rename duplicated test name. 2010-09-27 11:19:24 -03:00
Emilio Tagua
c2940a6bf4 Refactor method to avoid warnings and not run unnecessary code. 2010-09-27 11:19:24 -03:00
Emilio Tagua
d0621fde88 Avoid uninitialized variable warning. 2010-09-27 11:19:24 -03:00
Emilio Tagua
d95a16c526 Initialize @_request and @_response. 2010-09-27 11:19:23 -03:00
Emilio Tagua
2f59cd6fd6 Remove method previous method if already defined. 2010-09-27 11:19:23 -03:00
Emilio Tagua
e7c833fca9 Define @emitted_hidden_id if it doesn't exists and reuse it if it does. 2010-09-27 11:19:23 -03:00
Emilio Tagua
74d7664b60 Avoid uninitialized variable warning. 2010-09-27 11:19:23 -03:00
Emilio Tagua
1ed18fcc91 Initialize @cookies. 2010-09-27 11:19:23 -03:00
Emilio Tagua
583ddf22a2 Remove more warnings shadowing outer local variable. 2010-09-27 11:19:22 -03:00
Emilio Tagua
dafb4bd33b Don't shadow outer local variables. 2010-09-27 11:19:22 -03:00
Emilio Tagua
0cb1d87cd5 Remove duplicated test. 2010-09-27 11:19:22 -03:00
Emilio Tagua
53b91b11cc Avoid uninitialized variable warning, reuse @integration_session. 2010-09-27 11:19:21 -03:00
Emilio Tagua
24ef32fe93 Ask is @controller is defined to avoid warning. 2010-09-27 11:19:21 -03:00
Emilio Tagua
cd681681e6 Initialize @_routes if it doesn't exists. 2010-09-27 11:19:21 -03:00
Emilio Tagua
986bad6a3b Remove warning "too many arguments for format string" when interpolating with empty hash. 2010-09-27 11:19:21 -03:00
Emilio Tagua
b9fa46ca97 Initialize @_etag. 2010-09-27 11:19:21 -03:00
Emilio Tagua
bb2f53b409 Initialize @as before plural method is called. 2010-09-27 11:19:20 -03:00
Emilio Tagua
5ced275ac1 Remove old method before redefining it. 2010-09-27 11:19:20 -03:00
Emilio Tagua
5d773f8ded Remove warning "URI.unescape is obsolete" from actionpack. 2010-09-27 11:19:20 -03:00
Emilio Tagua
535371e956 Fix indentation. 2010-09-27 11:19:19 -03:00
Emilio Tagua
2d274a5208 Use parentheses when using assert_match followed by a regexp to avoid warnings. 2010-09-27 11:19:19 -03:00
Santiago Pastorino
56de4e9a80 Fix the precedence issue here 2010-09-26 17:54:00 -03:00
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
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
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
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
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
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
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
Carl Lerche
1da0dc2f90 Improve performance of applications using file uploads by not busting the method cache on every request containing a file upload. 2010-09-22 17:36:12 -07:00
Aaron Patterson
de9b3385fc fixing bug with rails use of rack-test 2010-09-22 17:09:06 -07:00
Emilio Tagua
59296ab26d Refactor routing methods.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-22 18:08:03 -03:00
Emilio Tagua
8c97f49f2e Refactor decode_credentials to avoid inject and use map instead.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-22 18:08:03 -03:00
Emilio Tagua
6d8a6700a7 Perf: refactor _assign method to avoid inject and defining unneeded local var.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-22 18:08:03 -03:00
Emilio Tagua
10a63e2a0c Refactor methods in html node to avoid injects.
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-22 18:08:02 -03:00
Joost Baaij
b39dfd5936 Document form_for behaviour when using file_field inside the block 2010-09-21 15:11:04 +02:00
Santiago Pastorino
0523b55ab9 file_field propagates up multipart property even inside of fields_for 2010-09-20 01:11:55 -07:00
Santiago Pastorino
88a82bcb2d application.js should be the last file on javascript_include_tag(:all) 2010-09-19 14:41:32 -07:00
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
Aaron Patterson
6b50bfb0f0 freeze is not necessary 2010-09-18 14:03:29 -07:00
Aaron Patterson
38f6533792 argument error is done for us 2010-09-18 14:00:00 -07:00
Santiago Pastorino
b17b980a15 file_field makes the enclosing form multipart 2010-09-18 12:31:00 -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
Andrew White
0bffd7d933 Raise ArgumentError instead of normalizing controller name when there is a leading slash [#5651 state:resolved] 2010-09-18 17:49:46 +01:00
Diego Carrion
aa654ab065 updated instructions on how to change the default session store 2010-09-18 12:46:21 -03:00
Diego Carrion
a63749483c updated instructions to generate the migration for the ActiveRecord session store table 2010-09-18 12:46:21 -03:00
Andrew White
013ed1c050 Remove leading slash from controller [#5651 state:resolved] 2010-09-18 13:32:54 +01:00
Carl Lerche
5ff2b73b48 Small tweak the ConditionalGet documentation
Time#utc does not need to be called when passing the object to :last_modified 	since it is called internally to Rails.
2010-09-17 14:20:35 -07:00
Carl Lerche
7418a44096 Add RouteSet#append
Allows specifying blocks to the routeset that will get 	appended after the RouteSet is drawn.
2010-09-17 12:05:40 -07:00
Alexey Mahotkin
dfebdb1b03 Tiny fixes to rdoc 2010-09-16 17:10:36 +04:00
rspeicher
6f3ac42550 Typos 2010-09-15 19:19:48 -04:00
Xavier Noria
dd6efe98b6 Merge remote branch 'docrails/master' 2010-09-14 20:07:29 +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
Carlhuda
d8d8334a0b Update changelog 2010-09-13 16:06:40 -07:00
wycats
254ab7d916 First pass at Rack::Cache 2010-09-13 16:06:03 -07:00
W. Andrew Loe III
9cd094b8da Only send secure cookies over SSL. 2010-09-13 15:11:46 -07:00
Xavier Noria
0522b26cdf reviews 02656ac 2010-09-13 23:10:43 +02:00
Xavier Noria
2eb5476d22 copy-edits 4eb8987 2010-09-13 22:54:42 +02:00
Carl Lerche
84d0c30cea Allow view helper's #initialize method to be called. [#5061 state:resolved] 2010-09-13 12:51:42 -07:00
Prem Sichanugrist
4eb89873c9 Add documentation for :spacer_template in Rails 3
This setting was existed since Rails 2.3.x, and seems like it have been left out when we rewriting the documentation.
2010-09-13 10:04:39 +07:00
Collin Miller
02656ac397 added documentation for :as and :object in PartialRenderer
Signed-off-by: Mikel Lindsaar <raasdnil@gmail.com>
2010-09-13 11:48:01 +10:00
Xavier Noria
9a8861f2e4 removes /i from the TRUSTED_PROXIES regexp, adds /x and comments for readability, adds a pointer to a Wikipedia section that documents the matched IPs 2010-09-12 01:37:07 +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
0aa66f04e4 gets rid of a double negation, no need to force exactly true/false in a predicate 2010-09-12 00:58:29 +02:00
Piotr Sarnacki
b3f6c41e16 Change singular to param_key in form_helper, param_key is now used for generating field names
Signed-off-by: Mikel Lindsaar <raasdnil@gmail.com>
2010-09-11 23:26:07 +10:00
Mikel Lindsaar
8b66c91c51 Partial revert of commit #7fae0aa4ac116 removing action_dispatch.prepare_dispatcher per commit #48bf667a8b1
See line note:
7fae0aa4ac (commitcomment-145148)
2010-09-11 20:45:40 +10: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
wycats
f6153f74da Merge remote branch 'drogus/engines' 2010-09-11 03:24:50 -05:00
Xavier Noria
2e2ac863d8 append asset IDs to the examples of the RDoc of #javascript_include_tag, and quick edit pass 2010-09-10 20:12:00 +02:00
Simon Jefford
7fae0aa4ac Add configuration option for tld length 2010-09-09 18:26:35 -07:00
wycats
74b49e87bb Simplify form_for by removing *args and extract_options! (at asakusa.rb) 2010-09-09 18:24:33 -07:00
Mikel Lindsaar
1a8d77d825 Adding linkage to redirect_to from Base and adding status code option reference 2010-09-09 14:05:06 +10:00
Piotr Sarnacki
6258f7c972 Change app to main_app in mounted_helpers 2010-09-08 19:27:59 +02:00
Piotr Sarnacki
18aee33335 Do not require passing :app to mounted helpers, it's actually useless and not DRY 2010-09-08 19:27:59 +02:00
David Trasbo
cfc8c7ab54 Wrap all occurences of <script> in a <tt> tag in docs [#5537 state:committed] 2010-09-06 18:22:33 +02:00
Carlos Antonio da Silva
c915ddd386 Start cleanup of deprecations in ActionView
Signed-off-by: José Valim <jose.valim@gmail.com>
2010-09-06 13:42:46 +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
José Valim
9757bfff9b Merge remote branch 'drogus/remove_deprecated_routes'
This merge removes the deprecated routes mapper from Rails and update its tests.
2010-09-05 15:45:12 +02:00
Santiago Pastorino
e20012b64b Make number_to_human and number_with_precision work with negatives 2010-09-05 10:21:55 -03:00
Santiago Pastorino
d717ff9e52 Fix indentation errors 2010-09-05 10:07:37 -03:00
Santiago Pastorino
88dfe16d95 Fix code style a bit 2010-09-05 10:06:09 -03:00
Ben Sharpe
b80cf265be Fix number_to_human(0) exception [#5532 state:resolved]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2010-09-05 09:56:13 -03: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
faba03850a Removed deprecated_mapper - we don't need it anymore 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
ca3936dbd6 Ported missing functionality from Rails 2.3.x, raise error on wrong regexps in :constraints in routes 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