Commit Graph

783 Commits

Author SHA1 Message Date
Rick Olson
0381398708 Fix regression from filter refactoring where re-adding a skipped filter resulted in it being called twice. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9080 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-23 01:48:17 +00:00
Jeremy Kemper
f2840f508d Fix an edge case with extra periods in Routing.normalize_paths. Closes #11337 [cavalle, veejar]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9069 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-21 22:44:04 +00:00
Jeremy Kemper
856a4dcf12 Refactor filters to use Active Support callbacks. Closes #11235.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9055 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-18 17:56:05 +00:00
David Heinemeier Hansson
db08329946 Fixed that polymorphic routes would modify the input array (closes #11363) [thomas.lee]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9053 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-17 23:45:42 +00:00
Rick Olson
1e0ac3a673 Fix more obscure nested parameter hash parsing bug. Closes #10797 [thomas.lee]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9020 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-13 03:22:25 +00:00
Rick Olson
3a17ea9031 Fix nested parameter hash parsing bug. #10797 [thomas.lee]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9010 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-11 07:46:39 +00:00
Pratik Naik
cff3ecc2ae Allow using named routes in ActionController::TestCase before any request has been made. Closes #11273 [alloy]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8992 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-08 12:56:41 +00:00
Pratik Naik
011e469410 Make MimeResponds::Responder#any work without explicit types. Closes #11140 [jaw6]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8987 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-07 11:17:05 +00:00
Pratik Naik
d7627361d3 Remove unused ActionController::Base.template_class. Closes #10787
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8985 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-05 12:12:17 +00:00
Pratik Naik
a96272a0c5 Moved template handlers related code from ActionView::Base to ActionView::Template
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8981 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-05 02:03:24 +00:00
Michael Koziarski
cc5a957d2b Allow file uploads in Integration Tests. Closes #11091 [RubyRedRick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8978 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-03 06:42:24 +00:00
Michael Koziarski
51b6619d4e Refactor partial rendering into a PartialTemplate class. [Pratik]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8976 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-03 04:01:35 +00:00
David Heinemeier Hansson
7dcd0d7d96 Added that requests with JavaScript as the priority mime type in the accept header and no format extension in the parameters will be treated as though their format was :js when it comes to determining which template to render. This makes it possible for JS requests to automatically render action.js.rjs files without an explicit respond_to block [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8956 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-29 18:09:23 +00:00
Jeremy Kemper
5e83612766 Fix Hash#from_xml with Type records. Closes #9242 [Juanjo Bazan, Isaac Feliu]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8937 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-27 23:11:08 +00:00
Michael Koziarski
1537aec184 use stubbing instead of monkeypatching to stop tests from interfering with one another. Closes #11163 [RubyRedRick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8899 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-19 21:43:13 +00:00
Michael Koziarski
db4f421b0b Add :trailing_slash option to UrlWriter. Closes #9117 [juanjo.bazan]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8892 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-18 00:42:06 +00:00
Michael Koziarski
1d5ea1857f Sort files to test to make load order platform independent. Fix the clash this exposes. Closees #11081 [tpope]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8880 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-16 03:08:05 +00:00
Michael Koziarski
46356100d1 Make sure render :update support the options hash. Closes #11088 [ernesto.jimenez]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8862 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-12 22:42:36 +00:00
Jamis Buck
11787b802a remove support for ampersand-delimited cookie values
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8861 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-12 21:45:39 +00:00
Marcel Molina
c848c4c621 Fix problem with render :partial collections, records, and locals. #11057 [lotswholetime]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8822 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-08 22:04:06 +00:00
Rick Olson
8e6638afa4 Fix bug with setting Request#format= after the getter has cached the value. Closes #10889 [cch1]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8811 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-07 16:46:50 +00:00
Michael Koziarski
692dbbf793 Introduce a Template class to ActionView. Closes #11024 [lifofifo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8805 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-06 04:26:40 +00:00
Jeremy Kemper
0da2aa6d11 Introduce the :index option for form_for and fields_for to simplify multi-model forms (see http://railscasts.com/episodes/75). Closes #9883.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8786 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 06:16:04 +00:00
Jeremy Kemper
fadaba679a Introduce map.resources :cards, :as => 'tarjetas' to use a custom resource name in the URL: cards_path == '/tarjetas'. Closes #10578.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8785 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 05:57:16 +00:00
Jeremy Kemper
9e1d91c24b TestSession supports indifferent access. Closes #7372.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8782 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 05:32:44 +00:00
Jeremy Kemper
b84a33ddd1 Don't split cookies on comma also. References r8505.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8773 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 02:55:44 +00:00
Michael Koziarski
900d6d7bd2 Make assert_routing aware of the HTTP method used. Closes #8039 [mpalmer]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8748 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-30 01:25:44 +00:00
Michael Koziarski
aecb7fbefc Correct line numbers from template errors. Closes #10937 [Aleksey Kondratenko]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8744 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-27 20:48:13 +00:00
Michael Koziarski
f11904ad6d Add documentation for polymorphic URL helpers, make API consistent for polymorphic_path and polymorphic_url.
Closes #10883 [mislav] Closes #8782 [gbuesing] Closes #8720 [gbuesing]


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8741 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-27 01:18:47 +00:00
Michael Koziarski
6e165b8940 Make it simpler to make the root route an alias for another route. Closes #10818 [bscofield]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8738 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-26 08:41:19 +00:00
Michael Koziarski
61c90a4ad6 Reapply the TemplateFinder first applied in [8669] then reverted in [8676]. Closes #10800 [lifofifo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8683 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-21 20:45:04 +00:00
Michael Koziarski
250a1194b9 Ensure mime types can be compared with symbols. Closes #10796 [bscofield]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8677 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-20 22:55:25 +00:00
Jeremy Kemper
88bc014acc Revert r8669 for now, breaks Action Mailer. Reopens #10800.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8676 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 06:01:57 +00:00
Jeremy Kemper
630c643f5b Add timing test for large restful route recognition. References #10835 [oleganza]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8673 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 05:24:44 +00:00
Jeremy Kemper
84b0f9c739 Introduce TemplateFinder to handle view paths and lookups. Closes #10800.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8669 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 03:20:39 +00:00
Jeremy Kemper
aae37bb4f7 Extract ActiveSupport::Callbacks from Active Record, test case setup and teardown, and ActionController::Dispatcher. Closes #10727.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8664 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 02:44:45 +00:00
Michael Koziarski
b812b23687 Make render :partial recognise form builders and use the _form partial. Closes #10814 [djanowski]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8646 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-16 02:01:57 +00:00
Michael Koziarski
8a71f87009 Ensure that the tests use the instance-level view-paths correctly. Closes #10820 [lifofifo]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8645 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-16 01:41:31 +00:00
Michael Koziarski
7501451d7f don't misbehave when redirecting to nil. Closes #10272 [farleyknight]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8633 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-12 03:09:39 +00:00
David Heinemeier Hansson
eff27ab119 Fix a few caching errors, expose a case thats still not working (ref #107330 [catfish]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8630 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-12 01:19:46 +00:00
Jeremy Kemper
9889d86a6c Introduce send_file :x_sendfile => true to send an X-Sendfile response header.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8628 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-11 22:07:04 +00:00
Michael Koziarski
104f31af1d Provide a nicer way to access headers. request.headers["Content-Type"] instead of request.headers["HTTP_CONTENT_TYPE"] [Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8625 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-11 06:39:56 +00:00
Michael Koziarski
e6de95889d * Pass around handler instances, not their classes [Koz]
* Move compilation, rendering and 'compilable?' checks into the Handlers [Koz]
 * Remove delegate_* methods as the handler is now an instance [Koz]


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8624 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-11 04:45:06 +00:00
Jeremy Kemper
a8eb90fcee Move fragment caching from special helper methods to TemplateHandler. Closes #10754 [Josh Peek]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8619 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-10 03:17:20 +00:00
Jeremy Kemper
59f222dbf7 UrlWriter respects relative_url_root. Closes #10748.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8616 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-10 02:51:09 +00:00
Michael Koziarski
5ef8a81b84 Don't append the forgery token to an ajax request if it's serializing a form, prevents duplicate tokens. Closes #10684 [macournoyer]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8598 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-08 21:17:08 +00:00
Jeremy Kemper
07fcac508a Ruby 1.9 compat: don't rely on Array#to_s to flatten and join as string
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8590 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 08:12:34 +00:00
Jeremy Kemper
7324444344 Ruby 1.9 compat: cookie store delete sets nil value instead of empty string
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8589 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 08:12:03 +00:00
Jeremy Kemper
3a62e0e868 Ruby 1.9 compat: check dom equality
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8587 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 08:09:06 +00:00
Jeremy Kemper
3b13a09e89 Filter procs must take 1 or 2 arguments. Raise ArgumentError otherwise.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8583 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-07 00:12:43 +00:00