| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
We are going to deprecate only on Rails 5 to make easier plugin
maintainers support different Rails versions. Right now we are only
discouraging their usage.
This reverts commit 6c5f43bab8206747a8591435b2aa0ff7051ad3de.
Conflicts:
actionpack/CHANGELOG.md
|
|
|
|
|
| |
This is the continuation of the work started at
9d62e04838f01f5589fa50b0baa480d60c815e2c
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
The ones that were actually testing AV functionality and should belong in there
|
|
|
|
| |
This interface should be use when implementing renderers.
|
| |
|
|
|
|
|
| |
This verifies the code added with:
https://github.com/rails/rails/commit/99c9d18601539c7e7e87f26bb047add1f93072af
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
When helper try to require missing file rails will throw exception about
missing helper.
# app/helpers/my_helper.rb
require 'missing'
module MyHelper
end
And when we try do load helper
class ApplicationController
helper :my
end
Rails will throw exception. This is wrong because there is a helper
file.
Missing helper file helpers/my_helper.rb
Now when helper try to require non-existed file rails will throw proper
exception.
No such file to load -- missing
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| | |
lucisferre/improve-layout-override-fallback-behavior
Provides standard layout lookup behavior for method and proc cases
Conflicts:
actionpack/CHANGELOG.md
|
| |
| |
| |
| |
| |
| |
| | |
When setting the layout either by referencing a method or supplying a
Proc there is no way to fall back to the default lookup behavior if
desired. This patch allows fallback to the layout lookup behavior when
returning nil from the proc or method.
|
|/ |
|
|
|
|
| |
It was being set to nil instead due to the wrong assignment.
|
|
|
|
| |
translation tests.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
aid ease of understanding and readability for tests
|
|
|
|
|
| |
proc without parameters can now be given to
AbstractController::layout
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Rails will now use your default layout (such as "layouts/application") when you specify a layout with `:only` and `:except` condition, and those conditions fail.
For example, consider this snippet:
class CarsController
layout 'single_car', :only => :show
end
Rails will use 'layouts/single_car' when a request comes in `:show` action, and use 'layouts/application' (or 'layouts/cars', if exists) when a request comes in for any other actions.
|
|
|
|
|
|
| |
For example, calling hello.erb is now deprecated. Since Rails 3.0
passing the handler had no effect whatsover. This commit simply
deprecates such cases so we can clean up the code in later releases.
|
|\
| |
| | |
Remove unused variable causing warning in 1.9.3
|
| | |
|
|/
|
|
|
|
|
|
|
|
|
| |
Secondly it seemed from the method that the intent was to test a case
where layout was declared in a symbol and the method named mention in
layout returns nil.
That case is already covered with class class WithSymbolReturningNil .
Also the case of SymbolReturningString is covered with the class
WithSymbol.
|
|
|
|
|
|
|
|
|
|
| |
If before_filter list was being called mistakenly then
the test should fail. However test will not fail because
second filter is assigning new values to @list. To truly
test that first before_filter is not called when it should
not be called then @list should not assigned value unconditionally.
This patch will make the test fail if first filter is called.
|
|\
| |
| | |
test name should reflect the name of the method
|
| |
| |
| |
| | |
that is actually being called
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
| |
everyone calls super as expected.
|
|
|
|
| |
instead instance_variable_get.
|
|
|
|
| |
maintaing just the helper with the same name as the controller.
|