Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add variants to Template class | Łukasz Strzałkowski | 2014-03-14 | 1 | -7/+10 |
| | |||||
* | Use the reference for the mime type to get the format | Rafael Mendonça França | 2014-02-18 | 2 | -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 string | Prem Sichanugrist | 2014-02-18 | 1 | -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łkowski | 2013-12-04 | 1 | -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 templates | Aaron Patterson | 2013-12-03 | 1 | -2/+2 |
| | |||||
* | Remove deprecated cattr_* requires | Genadi Samokovarov | 2013-12-03 | 2 | -2/+2 |
| | |||||
* | `ActionView::MissingTemplate` for partials includes underscore. | Yves Senn | 2013-12-02 | 1 | -0/+3 |
| | | | | | | Missing partial folder/_partial instead of folder/partial. Closes #13002. | ||||
* | Use `set_backtrace` instead of `@backtrace` in ActionView error | Shimpei Makimoto | 2013-11-16 | 1 | -2/+2 |
| | |||||
* | Remove require to AP stuff that left | Łukasz Strzałkowski | 2013-06-20 | 1 | -1/+0 |
| | |||||
* | Move actionpack/lib/action_view* into actionview/lib | Piotr Sarnacki | 2013-06-20 | 8 | -0/+791 |