| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
per [API documentation guidelines](http://edgeguides.rubyonrails.org/api_documentation_guidelines.html#oxford-comma)
[ci skip]
|
|\
| |
| | |
fix named route example [ci skip]
|
| | |
|
|/
|
|
|
|
|
|
| |
Ruby 2.4 unifies Fixnum and Bignum into Integer: https://bugs.ruby-lang.org/issues/12005
* Forward compat with new unified Integer class in Ruby 2.4+.
* Backward compat with separate Fixnum/Bignum in Ruby 2.2 & 2.3.
* Drops needless Fixnum distinction in docs, preferring Integer.
|
|\
| |
| |
| | |
Fixes Inflector#titleize to work with SafeBuffer
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The way Inflector#titleize was implemented did not work properly when
called on a SafeBuffer object. Using the global `$&` variable in the
gsub resulted in calling capitalize on a nil object for reasons I still
do not fully understand. Removing the UNSAFE_STRING_METHODS override for
the gsub method in SafeBuffer "fixed" the bug but is obviously
unacceptable.
An example of this is very easy to see in rails console:
ActiveSupport::SafeBuffer.new("my test").titleize
> NoMethodError: undefined method `capitalize' for nil:NilClass
Using the non global version of gsub with a |match| arg passed to the
block fixes the problem. Again I do not quite understand why. I noticed
that other parts of Inflector were already using the standard block arg
version of gsub so I don't think it should be a problem to convert this
method to using it as well.
|
|\ \
| | |
| | | |
Improve method description
|
|/ /
| |
| | |
Method description improved to reflect little bit more complicated scenario when names are camel-cased.
|
|\ \
| | |
| | | |
Removing redundant 'happens' in callbacks documentation
|
|/ / |
|
|\ \
| | |
| | | |
`md5` --> `MD5`
|
|/ /
| |
| |
| |
| | |
Sorry, I missed a few places in my last PR. This should be the last of
'em :grimacing:
|
|\ \
| | |
| | | |
update to make it less obvious that this guide is from 2008/2009
|
| | |
| | |
| | |
| | |
| | | |
malicious ads are neither new nor unusual
live HTTP headers project is dead - see https://www.mozdev.org/bugs/show_bug.cgi?id=25944
|
| | |
| | |
| | |
| | |
| | |
| | | |
Using locals will cause layouts to be cached multiple times in the
template cache. This commit removes locals from consideration when
looking up the layout.
|
| | |
| | |
| | |
| | |
| | | |
* Update documentation about Safari 4 supporting http only cookie
- Source: www.greebo.net/2009/06/09/httponly-in-safari-40-release/ via http://stackoverflow.com/questions/528405/which-browsers-do-support-httponly-cookies
|
| | | |
|
|\ \ \
| |/ /
|/| | |
Fix security guide capitalization errors
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Would have submitted to docrails, but this guide was just changed today,
and docrails doesn't have the most updated version :grimacing:
cc @vipulnsward
[ci skip]
|
|\ \ \
| | | |
| | | | |
Add Attributes API to release notes [ci skip]
|
| | | |
| | | |
| | | |
| | | | |
[ci skip]
|
|\ \ \ \
| |_|/ /
|/| | | |
`md5` --> `MD5`
|
| | | |
| | | |
| | | |
| | | | |
[ci skip]
|
|\ \ \ \
| |/ / /
|/| | | |
Update the Rails security guide [ci skip]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Bring up-to-date the information about the session id in the
Sessions section. The guide currently says that the session
id is a md5 hash while the implementation uses a random hex
string.
Fixes #25032.
[ci skip]
|
| | | |
| | | |
| | | |
| | | |
| | | | |
Leftover from an earlier commit, chose to fix because I was
just down in this file.
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Per request digest caches were added before we had hooks into
different units of work that Rails performs.
As such the most reliable way to prevent stale cache digests
was with a middleware. The middleware prevented staleness in
Action Controller requests.
However, the executor is superior because it should also prevent
staleness when running just Active Job jobs or broadcasting
through Action Cable's server.
|
|\ \ \ \
| | | | |
| | | | | |
Forward ActiveRecord::Relation#count to Enumerable#count if block given
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Introduce Date#all_day
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Useful for queries like:
Item.where(created_at: Date.current.all_day)
There was already a Time#all_day with the same behaviour, but for
queries like the above, Date is more convenient.
|
|\ \ \ \ \ \
| |_|_|/ / /
|/| | | | | |
Keep previous state around for nested calls to #suppress
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
If a call to #suppress from the same class occurred inside another #suppress
block, the suppression state would be set to false before the outer block
completes.
This change keeps the previous state around in memory and unwinds it
as the blocks exit.
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | |
| | | | | | | |
Fix bug in JSON deserialization when column default is an empty string
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
When `ActiveRecord::Coders::JSON` serialization is used and the default of the column returns `''` it raises the following error:
```
JSON::ParserError: A JSON text must at least contain two octets!
```
If MySQL is running in non-strict mode, it returns an empty string as column default for a text column:
```ruby
def extract_default
if blob_or_text_column?
@default = null || strict ? nil : ''
end
end
```
Since `''` is invalid JSON, there shouldn't be an attempt to parse it, it should be treated like nil.
ActiveRecord::Coders::JSON should behave consistently for all possible non-user-set column default values.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Rails 5.1 point type should not raise exception if empty string is provided as input
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
as value
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Follows the same pattern as controllers and jobs. Exceptions raised in
delivery jobs (enqueued by `#deliver_later`) are also delegated to the
mailer's rescue_from handlers, so you can handle the DeserializationError
raised by delivery jobs:
```ruby
class MyMailer < ApplicationMailer
rescue_from ActiveJob::DeserializationError do
…
end
```
ActiveSupport::Rescuable polish:
* Add the `rescue_with_handler` class method so exceptions may be
handled at the class level without requiring an instance.
* Rationalize `exception.cause` handling. If no handler matches the
exception, fall back to the handler that matches its cause.
* Handle exceptions raised elsewhere. Pass `object: …` to execute
the `rescue_from` handler (e.g. a method call or a block to
instance_exec) against a different object. Defaults to `self`.
|
|\ \ \ \ \ \ \ \
| |/ / / / / / /
|/| | | | | | | |
Add some assertions for BigDecimal#to_s
|
| | | | | | | | |
|
|/ / / / / / / |
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
Conventionally envs are ordered development -> test -> production.
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Add Action Cable guide to list
|
| | |/ / / / /
| |/| | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
This effectively publishes the "Action Cable Overview" guide. If we
don't think this is ready for the prime time, we can mark it as a "work
in progress" guide.
[ci skip]
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
Document and test ActionDispatch server_port
|
| | | | | | | | |
|
|\ \ \ \ \ \ \ \
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
Conflicts:
guides/source/configuring.md
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
ActionController::Metal.ancestors` command for api apps.
[ci skip]
|
| | | | | | | | |
| | | | | | | | |
| | | | | | | | |
| | | | | | | | | |
vs configuring the server itself
|