Joshua Peek
4d910b0333
Super lazy load view paths in development mode (no indexing or caching at all). Switch layout finders to use view path api to take advantage of cache.
2008-11-26 20:54:47 -06:00
Joshua Peek
2c01f2b4e9
use autoload instead of explicit requires for ActionView
2008-11-23 13:42:07 -06:00
David Heinemeier Hansson
130fe74d17
Changed the default of ActionView#render to assume partials instead of files when not given an options hash [DHH]
2008-11-19 14:00:16 +01:00
Luke Melia
60d6f25517
Fix rendering html partial via inline render when with :js format [ #1399 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-11-18 15:19:16 -06:00
Joshua Peek
ac50ee0edf
Track rendered templates in stack so the current template can always be accessed. Added ActionView::Base#template to access the template object.
2008-10-28 11:06:08 -05:00
Pratik Naik
a5cdb7a813
Remove stuff that was deprecated in 2-1-stable
2008-10-21 11:34:56 +01:00
Pratik Naik
4f53db0096
Move controller ivar copying to a separate method
2008-10-05 14:01:00 +01:00
Joshua Peek
28bf2fa038
Protect body ivar from being clobbered by the mailer template assigns
2008-09-28 12:31:45 -05:00
Jeremy Kemper
dc0411fad7
Check for uninitialized instance variables
2008-09-08 19:57:32 -07:00
Joshua Peek
086c3520c4
Moved layout exemption logic into the view
2008-08-31 11:34:46 -05:00
Joshua Peek
8eec694598
Prefix ActionView::Base private methods with an underscore
2008-08-31 10:50:43 -05:00
Pratik Naik
56c2b02f59
Fix AM tests and add tests for rendering logging
2008-08-31 16:29:21 +01:00
Pratik Naik
cdda7defa0
Add lost log messages about template rendering
2008-08-31 15:41:02 +01:00
Pratik Naik
a13d335461
Move layout rendering logic to ActionView::Base
2008-08-31 15:23:45 +01:00
Pratik Naik
a59a3db1f3
Move copying ivar logic from ActionController::Base to ActionView::Base
2008-08-31 03:48:09 +01:00
Joshua Peek
6ec07e0737
Store application and other context specific helper modules in ActionView::Base#helpers
2008-08-26 16:17:58 -05:00
Joshua Peek
229eedfda8
Cache JavaScriptGenerator's helper module set on the template
2008-08-26 12:17:55 -05:00
Joshua Peek
f2d8d13c64
Performance: Cache modules that extend the view context for JavaScriptGenerator
2008-08-25 21:50:26 -05:00
Joshua Peek
ba0d621695
Include all helpers into ActionView::Helper
2008-08-25 21:50:26 -05:00
Joshua Peek
0096f55869
Removed template_public? because it will always be true since the default template is never a partial
2008-08-21 21:34:03 -05:00
Ryan Bates
1129a24caf
Cleanup around partial rendering
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-21 21:03:33 -05:00
Ryan Bates
a8ece12fe2
Return nil instead of a space when passing an empty collection or nil to 'render :partial' [ #791 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-19 19:09:04 -05:00
Joshua Peek
c1a8690d58
Consistently use the framework's configured logger and avoid reverting to RAILS_DEFAULT_LOGGER unless necessary.
2008-08-18 23:36:13 -05:00
Ryan Bates
38c7d73e73
pass yielded arguments to block for ActionView::Base#render with :layout [ #847 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-08-17 19:29:24 -05:00
Joshua Peek
b2504f8ba0
Tidy up ActionMailer rendering logic to take advantage of view path cache instead of using file system lookups
2008-08-06 20:11:21 -05:00
Joshua Peek
55adaa2efc
Fixed bc5896e, and added test case for the caching bug it originally introduced.
2008-07-23 13:47:30 -05:00
Joshua Peek
e0db925be0
Revert 'bc5896e'
2008-07-23 11:23:25 -05:00
Joshua Peek
bc5896e708
Memoize ActionView::Base pick_template and find_partial_path for rendering duration
2008-07-22 10:27:32 -05:00
Joshua Peek
598b4546fd
Fixed spelling mistake in deprecation warning [ #381 state:resolved]
2008-07-19 15:43:39 -05:00
Tom Ward
c3d1fda555
Set the response content type to that of found template if not explicitly set elsewhere [ #444 state:resolved]
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-18 20:14:12 -05:00
Joshua Peek
d2ccb852d4
Removed lagacy TemplateHandler#render API. Left in a legacy TemplateHandler and Compilable stub so plugins will not have to change anything.
2008-07-18 16:00:20 -05:00
Joshua Peek
7359597004
Wrap AssetTagHelper's computed public path cache in a threadsafe store
2008-07-17 16:03:48 -05:00
Pratik Naik
0432d15164
Merge with docrails.
2008-07-16 13:01:23 +01:00
Joshua Peek
83e29b9773
Removed config.action_view.cache_template_loading, use config.cache_classes instead
2008-07-15 22:58:42 -05:00
Joshua Peek
68fe898189
Check first render format and extension. Fixes failing ActionMailer test.
2008-07-13 14:05:21 -05:00
Joshua Peek
e0fef66149
Made ActionView::Base#first_render a little more private. And added _last_render to track the most recent render. Will fix #609 as a side effect. [ #609 state:resolved]
2008-07-13 13:26:48 -05:00
Joshua Peek
99cc85bc09
Set config.action_view.warn_cache_misses = true to receive a warning if you perform an action that results in an expensive disk operation that could be cached
2008-07-12 15:31:50 -05:00
Joshua Peek
73b34e9f75
Refactor template preloading. New abstractions include Renderable mixins and a refactored Template class.
2008-07-12 14:33:46 -05:00
Joshua Peek
6ebdd0e32b
Changed ActionView::TemplateHandler#render API method signature to render(template, local_assigns = {})
2008-07-11 15:40:41 -05:00
Michael Koziarski
2f4aaed7b3
Disable the Accept header by default
...
The accept header is poorly implemented by browsers and causes strange errors when used on public sites where crawlers make requests too. You should use formatted urls (e.g. /people/1.xml) to support API clients. Alternatively to re-enable it you need to set:
config.action_controller.use_accept_header = true
A special case remains for ajax requests which will have a javascript format for the base resource (/people/1) if the X-Requested-With header is present. This lets ajax pages still use format.js despite there being no params[:format]
2008-07-07 07:31:49 +02:00
Joshua Peek
9828aecd2a
Lookup compiled methods in CompiledTemplates instance methods set instead of using a "methods_names" hash
2008-07-05 23:54:11 -05:00
Joshua Peek
ce5d958f8f
Do not stat template files in production mode before rendering. You will no longer be able to modify templates in production mode without restarting the server
2008-07-05 18:35:52 -05:00
Joshua Peek
5a3bc6f12f
Removed unused template_args variable
2008-07-05 17:40:39 -05:00
Joshua Peek
01637796d7
Revert "Moved TemplateHandlers to Base"
...
This reverts commit 42d215a925 .
Conflicts:
actionpack/lib/action_view/inline_template.rb
actionpack/lib/action_view/template.rb
2008-07-03 21:09:37 -05:00
Joshua Peek
1a478923dc
Reduce the number of callsites for new TemplateFiles
2008-07-03 14:01:45 -05:00
Joshua Peek
7d5c8505f5
Use render on InlineTemplate
2008-07-03 12:50:43 -05:00
Joshua Peek
42d215a925
Moved TemplateHandlers to Base
2008-07-03 12:48:00 -05:00
Michael Koziarski
12cf8f348b
Move template_format logic out to the request so it's alongside the 'regular' request format.
...
Use xhr? instead of the expensive trip through Request#accepts.
2008-07-03 19:43:06 +03:00
Michael Koziarski
df36a6f759
Remove unneeded ObjectWrapper class.
...
Was previously needed to work around the semantics of a deprecated (now removed) API to render :partial
2008-07-03 19:26:56 +03:00
Joshua Peek
3b3790a435
Deprecate :use_full_path render option. The supplying the option no longer has an effect.
2008-07-02 21:38:58 -05:00