Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix the resolver cache and stop mutating the lookup_context | Rafael Mendonça França | 2014-03-14 | 1 | -13/+0 |
| | | | | | Before we had a bug in the resolver cache so the disable_cache were not working when passing options to find | ||||
* | Introduce #with_formats_and_variants to prevent problems with mutating ↵ | Łukasz Strzałkowski | 2014-03-14 | 1 | -0/+13 |
| | | | | finder object | ||||
* | Ensure LookupContext in Digestor selects correct variant | Piotr Chmolowski | 2014-03-09 | 1 | -0/+14 |
| | | | | | | | | | | Related to: #14242 #14243 14293 Variants passed to LookupContext#find() seem to be ignored, so I've used the setter instead: `finder.variants = [ variant ]`. I've also added some more test cases for variants. Hopefully this time passing tests will mean it actually works. | ||||
* | Action Pack Variants | Łukasz Strzałkowski | 2013-12-04 | 1 | -1/+6 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. | ||||
* | `ActionView::MissingTemplate` for partials includes underscore. | Yves Senn | 2013-12-02 | 1 | -2/+2 |
| | | | | | | Missing partial folder/_partial instead of folder/partial. Closes #13002. | ||||
* | Fix AV tests, I18nProxy was moved to AV | Łukasz Strzałkowski | 2013-08-25 | 1 | -1/+1 |
| | |||||
* | Move template tests from actionpack to actionview | Piotr Sarnacki | 2013-06-20 | 1 | -0/+263 |