aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template
Commit message (Collapse)AuthorAgeFilesLines
* Got tests to pass with some more changes.Yehuda Katz2009-08-151-1/+1
| | | | | | | | | | | | | | | | * request.formats is much simpler now * For XHRs or Accept headers with a single item, we use the Accept header * For other requests, we use params[:format] or fallback to HTML * This is primarily to work around the fact that browsers provide completely broken Accept headers, so we have to whitelist the few cases we can specifically isolate and treat other requests as coming from the browser * For APIs, we can support single-item Accept headers, which disambiguates from the browsers * Requests to an action that only has an XML template from the browser will no longer find the template. This worked previously because most browsers provide a catch-all */*, but this was mostly accidental behavior. If you want to serve XML, either use the :xml format in links, or explicitly specify the XML template: render "template.xml".
* Caches and cache clearing seems to actually work, but the actual ↵Yehuda Katz2009-08-151-1/+16
| | | | architecture is kind of messy. Next: CLEAN UP.
* More cleanup of ActionView and reduction in need for blocks in some cases:Yehuda Katz2009-08-152-5/+0
| | | | | | | | * only one of partial_name or :as will be available as a local * `object` is removed * Simplify _layout_for in most cases. * Remove <% render :partial do |args| %> * <% render :partial do %> still works fine
* Clean up ActionView some:Yehuda Katz2009-08-152-3/+11
| | | | | | | | | | * Call _evaluate_assigns_and_ivars at the two entry points so we don't have to do a check at every render. * Make template.render viable without having to go through a wrapper method * Remove old TemplateHandler#render(template, local_assigns) path so we don't have to set self.template every time we render a template. * Move Template rescuing code to Template#render so it gets caught every time. * Pull in some tests from Pratik that test render @object in ActionView
* Add some more caching to the lookupYehuda Katz2009-08-111-12/+18
|
* This change causes some failing tests, but it should be possible to make ↵Yehuda Katz2009-08-111-2/+4
| | | | them pass with minimal performance impact.
* Rendering a template from ActionView will default to looking for partials ↵Yehuda Katz2009-08-091-1/+3
| | | | | | | | | only in the current mime type. * The old behavior was tested only as a side-effect of a different test--the original tests remain; a new template in the XML mime was added. * If you are relying on the current behavior and object to this change, please participate in http://groups.google.com/group/rubyonrails-core/browse_thread/thread/6ef25f3c108389bd
* Cache some more things to improve partial perfYehuda Katz2009-08-091-2/+6
|
* Went from 25% slower partials (vs. 2.3) to 10% faster. More to come.Yehuda Katz2009-08-091-2/+2
|
* Rename find_by_parts and find_by_parts? to find and exists?Yehuda Katz2009-08-071-1/+1
|
* Separate ActionView::Context so something else can easily be made into an AV ↵Yehuda Katz2009-07-192-5/+5
| | | | context
* Fix pattern to match various magic comment formatsAkira Matsuda2009-07-011-1/+1
|
* Try speeding up rails bootingYehuda Katz + Carl Lerche2009-06-252-3/+3
|
* Cleaning up if defined?(ActionController::Http) blocks from the pre new base ↵Yehuda Katz + Carl Lerche2009-06-171-2/+1
| | | | era.
* Rename path.rb to resolver.rbYehuda Katz + Carl Lerche2009-06-172-1/+1
|
* Rename ActionView::Template::Path ActionView::ResolverYehuda Katz + Carl Lerche2009-06-171-125/+124
|
* Fixing pending tests and fixed some formats / partial rendering semanticsYehuda Katz + Carl Lerche2009-06-174-5/+3
|
* ActionPack components should no longer have undeclared dependencies.Yehuda Katz + Carl Lerche2009-06-081-0/+2
| | | | | | | * Tests can be run in isolation * Dependencies added * A few tests modified to avoid depending on AS deps not depended on my files they were testing
* Ensure ERB source begins with the encoding commentJeremy Kemper2009-06-012-2/+8
|
* Ruby 1.9: ERB template encoding using a magic comment at the top of the fileJeremy Kemper2009-05-282-8/+14
|
* Get controller/render_other_test.rb to pass on new base and fixed a bug in ↵Yehuda Katz + Carl Lerche2009-05-221-1/+2
| | | | new base with regards to rendering layouts.
* Get controller/layout_test.rb running on new base except for ↵Yehuda Katz + Carl Lerche2009-05-222-1/+5
| | | | ActionController::Base.exempt_from_layout which is going to be deprecated.
* Move Safari response-padding fix to Rails2Compatibility. Should be a Rack ↵Jeremy Kemper2009-05-211-1/+1
| | | | concern.
* Added the :rjs render optionYehuda Katz + Carl Lerche2009-05-211-0/+1
|
* Remove some response content type concepts from ActionViewYehuda Katz + Carl Lerche2009-05-215-7/+23
|
* Added responds_to to new base.Yehuda Katz + Carl Lerche2009-05-201-1/+6
|
* Fix ActionMailer Symbol#to_proc instanceYehuda Katz2009-05-161-1/+1
|
* Cherry-pick core extensionsJeremy Kemper2009-05-131-0/+1
|
* Ported ConditionalGet to new BaseYehuda Katz + Carl Lerche2009-05-111-0/+2
|
* More community code review :)Yehuda Katz2009-05-111-0/+2
|
* Support implicit and explicit content typesYehuda Katz + Carl Lerche2009-05-011-2/+1
|
* Fixes ActionMailer to work with the ActionView refactoringYehuda Katz + Carl Lerche2009-04-271-151/+1
|
* Refactor ActionView::TemplateYehuda Katz + Carl Lerche2009-04-274-173/+237
| | | | | | | | ActionView::Template is now completely independent from template storage, which allows different back ends such as the database. ActionView::Template's only responsibility is to take in the template source (passed in from ActionView::Path), compile it, and render it.
* Refactor ActionView::PathYehuda Katz + Carl Lerche2009-04-223-55/+102
| | | | | | | | * Decouple from ActionController and ActionMailer * Bring back localization support. * Prepare to decouple templates from the filesystem. * Prepare to decouple localization from ActionView * Fix ActionMailer to take advantage of ActionView::Path
* Opt in to DependenciesJeremy Kemper2009-04-221-0/+1
|
* Make more Template methods public to make ActionMailer tests passCarl Lerche & Yehuda Katz2009-04-161-8/+8
|
* Makes rails-dev-boost work againCarl Lerche & Yehuda Katz2009-04-143-101/+108
|
* Move all Templates methods not used by other class into private toCarl Lerche & Yehuda Katz2009-04-141-87/+88
| | | | define surface area of the class.
* Resurrecting 1.9 compatibility.Carl Lerche & Yehuda Katz2009-04-131-1/+1
|
* Bring abstract_controller up to date with rails/masterCarl Lerche & Yehuda Katz2009-04-132-24/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list of commits that could not be applied cleanly or are obviated with the abstract_controller refactor. They all need to be revisited to ensure that fixes made in 2.3 do not reappear in 3.0: 2259ecf368e6a6715966f69216e3ee86bf1a82a7 AR not available * This will be reimplemented with ActionORM or equivalent 06182ea02e92afad579998aa80144588e8865ac3 implicitly rendering a js response should not use the default layout [#1844 state:resolved] * This will be handled generically 893e9eb99504705419ad6edac14d00e71cef5f12 Improve view rendering performance in development mode and reinstate template recompiling in production [#1909 state:resolved] * We will need to reimplement rails-dev-boost on top of the refactor; the changes here are very implementation specific and cannot be cleanly applied. The following commits are implicated: 199e750d46c04970b5e7684998d09405648ecbd4 3942cb406e1d5db0ac00e03153809cc8dc4cc4db f8ea9f85d4f1e3e6f3b5d895bef6b013aa4b0690 e3b166aab37ddc2fbab030b146eb61713b91bf55 ae9f258e03c9fd5088da12c1c6cd216cc89a01f7 44423126c6f6133a1d9cf1d0832b527e8711d40f 0cb020b4d6d838025859bd60fb8151c8e21b8e84 workaround for picking layouts based on wrong view_paths [#1974 state:resolved] * The specifics of this commit no longer apply. Since it is a two-line commit, we will reimplement this change. 8c5cc66a831aadb159f3daaffa4208064c30af0e make action_controller/layouts pick templates from the current instance's view_paths instead of the class view_paths [#1974 state:resolved] * This does not apply at all. It should be trivial to apply the feature to the reimplemented ActionController::Base. 87e8b162463f13bd50d27398f020769460a770e3 fix HTML fallback for explicit templates [#2052 state:resolved] * There were a number of patches related to this that simply compounded each other. Basically none of them apply cleanly, and the underlying issue needs to be revisited. After discussing the underlying problem with Koz, we will defer these fixes for further discussion.
* Working on being able to render :text with layoutsCarl Lerche2009-03-233-1/+17
|
* AbstractController now supports layouts and renderingYehuda Katz2009-02-271-1/+1
|
* First, very early, AbstractController code. More to comeYehuda Katz2009-02-241-0/+2
|
* Merge commit 'rails/3-0-unstable'Yehuda Katz2009-01-301-14/+42
| | | | | | | | | | | | | Conflicts: actionpack/lib/action_controller/base.rb actionpack/lib/action_dispatch/http/mime_type.rb actionpack/lib/action_dispatch/http/request.rb actionpack/lib/action_view/base.rb actionpack/lib/action_view/paths.rb actionpack/test/controller/session/cookie_store_test.rb actionpack/test/dispatch/rack_test.rb actionpack/test/dispatch/request_test.rb
* Begin unifying the interface between ActionController and ActionViewYehuda Katz2009-01-2210-0/+585