| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is not storying the RouteSet instance anywhere as the other
examples in the file, so no need to use #tap.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Add tests to ensure default proc is used when `HashWithIndifferentAccess' is initialized with a block
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
initialized with a block
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
Raise a descriptive error if non-positive integer passed to in_groups_of
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This is more consistent than the current behaviour of raising a
`ZeroDivisionError: divided by 0` error when 0 is given, which can be
non-obvious especially if `in_groups_of` is part of a longer chain of
methods.
The negative case was ok - "ArgumentError: invalid slice size" - but
this error is clearer still.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
The message passed to Minitest's assert_raise is used as output in case
the assertion fails, but we can test against the exact message by using
the actual exception object that is returned from the assert_raise call.
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Removed unnecessary call to 'convert_key' in 'HashWithIndifferentAccess#to_hash'
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
All the keys are already Strings by virtue of being a HashWithIndifferentAccess.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
We are using blocks here so we have access to the environment around
them, no need for globals.
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
every call to default_resources_path_names allocates a new hash, no need
to dup
|
| | | | | | | | |
|
| |/ / / / / /
|/| | | | | |
| | | | | | |
| | | | | | | |
this makes scope rollback much easier
|
| |/ / / / /
|/| | | | |
| | | | | |
| | | | | | |
just ask whether or not the route is defined
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
we can `super` in to the previous implementation.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
we already know what helpers are path helpers, so just iterate through
that list and define the helpers with warnings
|
| | | | | | |
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
this lets us avoid hard coding a regexp for separating path and url
helpers in the clear! method.
|
| | | | | | |
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
Deprecate `*_path` methods in mailers
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Email does not support relative links since there is no implicit host. Therefore all links inside of emails must be fully qualified URLs. All path helpers are now deprecated. When removed, the error will give early indication to developers to use `*_url` methods instead.
Currently if a developer uses a `*_path` helper, their tests and `mail_view` will not catch the mistake. The only way to see the error is by sending emails in production. Preventing sending out emails with non-working path's is the desired end goal of this PR.
Currently path helpers are mixed-in to controllers (the ActionMailer::Base acts as a controller). All `*_url` and `*_path` helpers are made available through the same module. This PR separates this behavior into two modules so we can extend the `*_path` methods to add a Deprecation to them. Once deprecated we can use this same area to raise a NoMethodError and add an informative message directing the developer to use `*_url` instead.
The module with warnings is only mixed in when a controller returns false from the newly added `supports_relative_path?`.
Paired @sgrif & @schneems
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
JackDanger/remove_redundant_self_in_class_method_calls
Remove redundant `self.` in class method calls
|
| | |/ / / /
| |/| | | |
| | | | | |
| | | | | | |
These are the only instances of this in the whole code base.
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
Prevent using String#scrub on Rubinius
|
|/ / / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Rubinius' has built-in support for String#scrub but it doesn't have yet
support for ASCII-incompatible chars so for now, we should rely on the
old implementation of #tidy_bytes.
|
|/ / / /
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This reverts commit f632f79b8dcd144408c66a544984b2ba9cf52f87, reversing
changes made to 98c7fe87690ca4de6c46e8f69806e82e3f8af42d.
Closes #16343
|
|\ \ \ \
| | | | |
| | | | | |
remove unneeded test model for ActiveModel test cases.
|
| | | | | |
|
|\ \ \ \ \
| |_|/ / /
|/| | | | |
Add implicit receiver support to `Object#with_options`
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Remove @state.parent assignment on commit
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
This piece of code was introduced on
67d8bb963d5d51fc644d6b1ca20164efb4cee6d7 , which was calling
`committed?` in the `transaction_state` before calling the `committed!`
method. However on 7386ffc781fca07a0c656db49fdb54678caef809, the
`committed?` check was removed and replaced by a `finalized?`, which
only checks if the state is not nil. Thus we can remove that line.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
use helpers.include? so we don't get any false positives
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
we should not be accessing internals to figure out if a method is
defined.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
since helpers is a set, we can be confident about when to remove methods
from the module.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
after this, we can disconnect @module from the instance
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
we can cache the module on the stack, then reuse it
|
| | | | | | |
|
| | | | | | |
|
|\ \ \ \ \ \
| |_|/ / / /
|/| | | | | |
GET request should not write to database note added. [ci skip]
|