Santiago Pastorino
d3d724bb88
Remove this require since active_support/testing/default doesn't exist anymore
2010-10-20 12:50:31 -02:00
Krekoten' Marjan
a75d21df06
Fix status initialization when custom status provided
...
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2010-10-18 17:34:22 -02:00
Krekoten' Marjan
7b2ec381ca
Change def to attr_reader + alias
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-10-18 00:54:58 +02:00
Les Hill and Sandro Turriate
dde54f00c6
Show exceptions rescues the original exception
...
[#5784 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-10-12 00:56:07 +02:00
Miles Egan
3eff729079
make sure request parameters are accessible after rack throws an exception parsing the query string [ #3030 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-10-12 00:56:07 +02:00
Andrew White
067c1aa0e0
Refactor resource action scope methods
2010-10-08 22:00:27 +01: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
2a3022db7f
delegate to the @tempfile instance variable
2010-10-04 16:56:45 -07:00
Aaron Patterson
28bb1885f5
avoid method call to compact
2010-10-04 16:08:01 -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
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
Aaron Patterson
ff2fdcc52b
removing AS::Testing::Default in favor of just undefing default_test
2010-10-01 17:22:42 -07: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
Neeraj Singh
692f5184c4
no need to check for nil?
2010-09-30 08:11:34 +08:00
Aaron Patterson
78ac9c2be7
dry up method checking in the request object
2010-09-29 16:09:58 -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
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
523f98099d
Remove more warnings on AP.
2010-09-28 18:01:48 -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
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
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
059d609a1a
Avoid more uninitialized variable warnings.
2010-09-28 15:46:30 -03:00
Emilio Tagua
adcc5e11fe
@selected may not be defined here, avoid warning.
2010-09-28 15:29:40 -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
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