The current implementation of variants= don't allow a resetting to nil, wich is the default value.
This results in the following code smell:
case request.user_agent
when /iPhone/
request.variants = :phone
when /iPad/
...
Stems from Google group discussion.
Currently AS::TimeWithZone has two methods to add an interval to a time: +(other) and since(other) ([docs](http://edgeap…
The current implementation of variants= don't allow a resetting to nil, wich is the default value.
This results in the following code smell:
case request.user_agent
when /iPhone/
request.variants = :phone
when /iPad/
...
@fxn Great job with the guide, I read it all! Yeah!
Some paragraphs might be restructured, but I'll leave that to you
since you are currently working on it. This commit only includes
some minor typos and commas that in my opinion cl…
When an around_action does not yield, then the corresponding action is never executed and the after_ actions are never invoked.
The value returned by the around_action does not have any impact on this: an around_action c…
Currently, the ActiveRecord::Callbacks documentation states:
> If a before_* callback returns false, all th…
This stems from https://github.com/rails/rails/pull/17227#discussion_r21641358
It's simply a clarification of the current behavior by which if an
after_validation callback returns false, then further after_
callbacks **are not…
define_callbacks from ActiveSupport::Callbacks accepts the
:skip_after_callbacks_if_terminated option since #4866 but the option
is not tested anywhere.
This commit adds tests and fixes documentation for the option, making it …
fixes that assert_template(layout: 1) will not fail (false positive), also tried to refactor assert_template by splitting up in smaller chunks covered in private methods. Stopped at :partial since it not seemed to be covered by tests.
I ran into an error where one of my Enum values caused a conflict
with a reserved keyword. The error message was confusing so I tried
to make it closer to something I'd be able to understand and debug
more easily.
I can't explain why nobody fixed it yet, but it was suggesting itself.
The RecursiveCallbackDeveloper and ImmutableMethodDeveloper classes
are not used anymore in tests, and neither is the @cancelled variable.
The validation added in 5a3dc8092d19c816b0b1203945639cb91d065847 will
reject values for the :on option for after_commit and after_rollback
callbacks that are string values like "create".
However, the error message says ":on cond…
I was looking for an easy way to stream non template content, but couldn't find anything. ActionController::Streaming does most of the needed already, so it is a matter of allowing to pass a custom object that responds to each instea…
All of the behavior :environment was giving (that db:schema:load needed) was
provided as well with :load_config.
This will address an issue introduced in
https://github.com/rails/rails/pull/15394. The fact that db:schema:load now
drops …
Users should pass strings to queries instead of classes