aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view/template/resolver.rb
Commit message (Collapse)AuthorAgeFilesLines
* Resolvers now consider timestamps.José Valim2010-10-101-21/+46
| | | | | | | | | | | Before this patch, every request in development caused the template to be compiled, regardless if it was updated in the filesystem or not. This patch now checks the timestamp and only compiles it again if any change was done. While this probably won't show any difference for current setups, but it will be useful for asset template handlers (like SASS), as compiling their templates is slower than ERb, Haml, etc.
* Remove locals dependency from template.José Valim2010-10-071-7/+23
| | | | | | This means that templates does not need to store its source anymore, allowing us to reduce the ammount of memory taken by our Rails processes. Naively speaking, if your app/views contains 2MB of files, each of your processes (after being hit by a bunch of requests) will take 2MB less of memory after this commit. This is extremely important for the upcoming features. Since Rails will also render CSS and JS files, their source won't be stored as well allowing us to decrease the ammount of memory taken.
* Get rid of ruby warnings in Resolvers. Move a few methods up to the abstract ↵José Valim2010-10-071-21/+24
| | | | class.
* Initialize @path.Emilio Tagua2010-09-281-0/+1
|
* Revert "Setup explicit requires for files with exceptions. Removed them from ↵José Valim2010-09-021-1/+0
| | | | | | | | autoloading." Booting a new Rails application does not work after this commit [#5359 state:open] This reverts commit 38a421b34d0b414564e919f67d339fac067a56e6.
* Setup explicit requires for files with exceptions. Removed them from ↵Łukasz Strzałkowski2010-09-021-0/+1
| | | | | | autoloading. Signed-off-by: José Valim <jose.valim@gmail.com>
* Avoid using Pathname on Resolver and AS::Dependencies.José Valim2010-06-241-1/+1
|
* Final touches and fixes.Rizwan Reza2010-06-211-0/+1
|
* Revert "Moved encoding work in progress to a feature branch."wycats2010-05-171-1/+4
| | | | This reverts commit ade756fe42423033bae8e5aea8f58782f7a6c517.
* Moved encoding work in progress to a feature branch.Jeremy Kemper2010-05-161-4/+1
| | | | This reverts commits af0d1a88157942c6e6398dbf73891cff1e152405 and 64d109e3539ad600f58536d3ecabd2f87b67fd1c.
* Significantly improved internal encoding heuristics and support.wycats2010-05-161-1/+4
| | | | | | | | | | | | | | | | | | | | | | | | | * Default Encoding.default_internal to UTF-8 * Eliminated the use of file-wide magic comments to coerce code evaluated inside the file * Read templates as BINARY, use default_external or template-wide magic comments inside the Template to set the initial encoding * This means that template handlers in Ruby 1.9 will receive Strings encoded in default_internal (UTF-8 by default) * Create a better Exception for encoding issues, and use it when the template source has bytes that are not compatible with the specified encoding * Allow template handlers to opt-into handling BINARY. If they do so, they need to do some of their own manual encoding work * Added a "Configuration Gotchas" section to the intro Rails Guide instructing users to use UTF-8 for everything * Use config.encoding= in Ruby 1.8, and raise if a value that is an invalid $KCODE value is used Also: * Fixed a few tests that were assert() rather than assert_equal() and were caught by Minitest requiring a String for the message * Fixed a test where an assert_select was misformed, also caught by Minitest being more restrictive * Fixed a test where a Rack response was returning a String rather than an Enumerable
* yield always return an array, so we don't need to use .key?José Valim2010-03-311-6/+1
|
* Improve performance of the rendering stack by freezing formats as a sign ↵José Valim2010-03-191-7/+12
| | | | that they shouldn't be further modified.
* Sending the partial as info is no longer required.José Valim2010-03-181-3/+3
|
* Move more normalization up to the lookup context, so it does not have to ↵José Valim2010-03-161-23/+1
| | | | repeat in every resolver.
* Optimize and clean up how details key get expired.José Valim2010-03-101-0/+5
|
* Clean up the API required from ActionView::Template.José Valim2010-03-091-19/+12
|
* Clean LookupContext API.José Valim2010-03-081-6/+10
|
* Move details to lookup_context and make resolvers use the cache key.José Valim2010-03-081-34/+12
|
* Speed up performance in resolvers by adding fallbacks just when required.José Valim2010-03-081-24/+7
|
* First take on ViewPaths clean up.José Valim2010-03-071-8/+11
|
* Actually, revert previous commit. Having a lot of information is better than ↵José Valim2010-03-051-9/+3
| | | | having no information at all.
* Define to_s method in ActionView::Resolver, so I'm not required to write it ↵José Valim2010-03-051-1/+5
| | | | in inherited classes.
* Fix render :file => "#{Rails.root}/public/404.html", :status => :not_found. ↵Yehuda Katz2010-02-231-1/+1
| | | | Closes #8994
* Resolve view paths correctly on CygWinSam Ruby2010-02-021-1/+1
| | | | Signed-off-by: Mikel Lindsaar <raasdnil@gmail.com>
* Convert to class_attributeJeremy Kemper2010-02-011-1/+2
|
* deOMGifying Railties, Active Support, and Action PackMikel Lindsaar2010-01-311-2/+1
|
* Fix t('.helper').José Valim2010-01-261-5/+8
|
* Silence some trivial warnings: shadowed local vars, indentation mismatchesJeremy Kemper2009-12-281-8/+4
|
* Reorganize autoloads:Carlhuda2009-12-021-3/+3
| | | | | | | | | | | | | | | | | | | | | * A new module (ActiveSupport::Autoload) is provide that extends autoloading with new behavior. * All autoloads in modules that have extended ActiveSupport::Autoload will be eagerly required in threadsafe environments * Autoloads can optionally leave off the path if the path is the same as full_constant_name.underscore * It is possible to specify that a group of autoloads live under an additional path. For instance, all of ActionDispatch's middlewares are ActionDispatch::MiddlewareName, but they live under "action_dispatch/middlewares/middleware_name" * It is possible to specify that a group of autoloads are all found at the same path. For instance, a number of exceptions might all be declared there. * One consequence of this is that testing-related constants are not autoloaded. To get the testing helpers for a given component, require "component_name/test_case". For instance, "action_controller/test_case". * test_help.rb, which is automatically required by a Rails application's test helper, requires the test_case.rb for all active components, so this change will not be disruptive in existing or new applications.
* Fix a bug where templates with locales were not being sorted correctlyYehuda Katz2009-10-161-1/+1
|
* Replace :formats => ["*/*"] with the default formats setYehuda Katz + Carl Lerche2009-09-031-0/+2
|
* Refactor ActionView::ResolverYehuda Katz + Carl Lerche2009-09-031-77/+95
|
* Fix the */* with Net::HTTP bug [#3100 state:resolved]Yehuda Katz + Carl Lerche2009-09-011-22/+9
|
* Add a default parameter for Resolver#initializeCarl Lerche2009-08-261-1/+1
|
* 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".
* 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.
* Rename find_by_parts and find_by_parts? to find and exists?Yehuda Katz2009-08-071-1/+1
|
* Rename path.rb to resolver.rbYehuda Katz + Carl Lerche2009-06-171-0/+150