- 20 6月, 2017 1 次提交
-
-
由 Pat Allan 提交于
Plus a couple of related ActionPack patches.
-
- 20 1月, 2017 1 次提交
-
-
由 kenta-s 提交于
-
- 29 10月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 27 10月, 2016 1 次提交
-
-
由 Xavier Noria 提交于
Regexp#match? should be considered to be part of the Ruby core library. We are emulating it for < 2.4, but not having to require the extension is part of the illusion of the emulation.
-
- 16 8月, 2016 1 次提交
-
-
由 Rafael Mendonça França 提交于
Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
-
- 07 8月, 2016 2 次提交
-
-
由 Xavier Noria 提交于
-
由 Xavier Noria 提交于
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
-
- 25 7月, 2016 1 次提交
-
-
由 Xavier Noria 提交于
Where appropriate, prefer the more concise Regexp#match?, String#include?, String#start_with?, or String#end_with?
-
- 23 1月, 2016 1 次提交
-
-
由 Aaron Patterson 提交于
CVE-2016-0752
-
- 23 9月, 2014 1 次提交
-
-
由 Genadi Samokovarov 提交于
While trying to provide a reproducible test for #17008 I stumbled on this one. Seems to be quite an old piece of code, but its definitely useful in situations like the reproducible test cases like the one above.
-
- 14 3月, 2014 1 次提交
-
-
由 Łukasz Strzałkowski 提交于
-
- 04 12月, 2013 1 次提交
-
-
由 Łukasz Strzałkowski 提交于
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.
-
- 20 6月, 2013 1 次提交
-
-
由 Piotr Sarnacki 提交于
-
- 05 6月, 2011 1 次提交
-
-
由 Guillermo Iguaran 提交于
-
- 20 3月, 2011 1 次提交
-
-
由 Chris Kowalik 提交于
-
- 27 12月, 2010 1 次提交
-
-
由 artemave 提交于
-
- 10 10月, 2010 1 次提交
-
-
由 José Valim 提交于
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.
-
- 08 10月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 07 10月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 27 9月, 2010 1 次提交
-
-
由 Emilio Tagua 提交于
-
- 14 8月, 2010 2 次提交
-
-
由 Santiago Pastorino 提交于
-
由 Santiago Pastorino 提交于
-
- 03 5月, 2010 2 次提交
-
-
由 David Chelimsky 提交于
[#4523 state:resolved] Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
由 David Chelimsky 提交于
[#4522 state:resolved] Signed-off-by: NJosé Valim <jose.valim@gmail.com>
-
- 20 3月, 2010 1 次提交
-
-
由 José Valim 提交于
Improve performance of the rendering stack by freezing formats as a sign that they shouldn't be further modified.
-
- 18 3月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 16 3月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 12 3月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 11 3月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 09 3月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 07 3月, 2010 1 次提交
-
-
由 José Valim 提交于
-
- 04 9月, 2009 2 次提交
-
-
- 02 9月, 2009 1 次提交
-
-
- 16 8月, 2009 1 次提交
-
-
由 Yehuda Katz 提交于
* 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".
-
- 24 6月, 2009 1 次提交
-
-
- 18 6月, 2009 2 次提交
-
-
- 21 5月, 2009 1 次提交
-
-
- 02 5月, 2009 1 次提交
-
-