aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/template
Commit message (Collapse)AuthorAgeFilesLines
...
* Add +variants to ActionView::FileSystemResolver documentation.Felipe Oliveira2014-09-261-3/+4
|
* handle <%== nil %> casesAaron Patterson2014-09-141-2/+2
| | | | | This is much less common than string literal appends, so add a special case method for it. Maybe fixes bug reported by @jeremy on 97ef636191933f1d4abc92fc10871e6d1195285c
* Add unregister_template_handler to prevent leaks.Zuhao Wan2014-06-121-0/+9
|
* Feature detect based on Ruby version.Aaron Patterson2014-05-181-1/+1
| | | | | | | I didn't want to do this, FNM_EXTGLOB is defined on 2.1.x, but Dir.glob returns the wrong value on Ruby less than 2.2.0. Checking for a case-insensitive FS seems too hard, so just check Ruby version Checking for a case-insensitive FS seems too hard, so just check Ruby version.
* feature detect for FNM_EXTGLOB for older Ruby. Fixes #15053Aaron Patterson2014-05-101-5/+21
|
* use fnmatch to test for case insensitive file systemsAaron Patterson2014-05-091-4/+2
| | | | | | this is due to: https://bugs.ruby-lang.org/issues/5994
* Fix documentation of extract_handler_and_format_and_variant [ci skip]Prathamesh Sonpatki2014-04-261-1/+1
|
* Add variants to Template classŁukasz Strzałkowski2014-03-141-7/+10
|
* Use the reference for the mime type to get the formatRafael Mendonça França2014-02-182-2/+2
| | | | | | | | Before we were calling to_sym in the mime type, even when it is unknown what can cause denial of service since symbols are not removed by the garbage collector. Fixes: CVE-2014-0082
* Introduce `render :html` for render HTML stringPrem Sichanugrist2014-02-181-0/+34
| | | | | | | | | This is an option for to HTML content with a content type of `text/html`. This rendering option calls `ERB::Util.html_escape` internally to escape unsafe HTML string, so you will have to mark your string as html safe if you have any HTML tag in it. Please see #12374 for more detail.
* Action Pack VariantsŁukasz Strzałkowski2013-12-041-7/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, variants in the templates will be picked up if a variant is set and there's a match. The format will be: app/views/projects/show.html.erb app/views/projects/show.html+tablet.erb app/views/projects/show.html+phone.erb If request.variant = :tablet is set, we'll automatically be rendering the html+tablet template. In the controller, we can also tailer to the variants with this syntax: class ProjectsController < ActionController::Base def show respond_to do |format| format.html do |html| @stars = @project.stars html.tablet { @notifications = @project.notifications } html.phone { @chat_heads = @project.chat_heads } end format.js format.atom end end end The variant itself is nil by default, but can be set in before filters, like so: class ApplicationController < ActionController::Base before_action do if request.user_agent =~ /iPad/ request.variant = :tablet end end end This is modeled loosely on custom mime types, but it's specifically not intended to be used together. If you're going to make a custom mime type, you don't need a variant. Variants are for variations on a single mime types.
* optimize string literals in erb templatesAaron Patterson2013-12-031-2/+2
|
* Remove deprecated cattr_* requiresGenadi Samokovarov2013-12-032-2/+2
|
* `ActionView::MissingTemplate` for partials includes underscore.Yves Senn2013-12-021-0/+3
| | | | | | Missing partial folder/_partial instead of folder/partial. Closes #13002.
* Use `set_backtrace` instead of `@backtrace` in ActionView errorShimpei Makimoto2013-11-161-2/+2
|
* Remove require to AP stuff that leftŁukasz Strzałkowski2013-06-201-1/+0
|
* Move actionpack/lib/action_view* into actionview/libPiotr Sarnacki2013-06-208-0/+791