Commit Graph

6162 Commits

Author SHA1 Message Date
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