| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
TL;DR The primary driver is to remove autoload surprise.
This is related to #12106. (The root cause for that ticket is that
json/add defines Regexp#to_json among others, but here I'll reproduce
the problem without json/add.)
Before:
>> require 'active_support/core_ext/to_json'
=> true
>> //.as_json
NoMethodError: undefined method `as_json' for //:Regexp
from (irb):3
from /Users/godfrey/.rvm/rubies/ruby-2.0.0-p195/bin/irb:16:in `<main>'
>> //.to_json
=> "\"(?-mix:)\""
>> //.as_json
=> "(?-mix:)"
After:
>> require 'active_support/core_ext/to_json'
=> true
>> //.as_json
=> "(?-mix:)"
This is because ActiveSupport::JSON is autoloaded the first time
Object#to_json is called, which causes additional core extentions
(previously defined in active_support/json/encoding.rb) to be loaded.
When someone require 'active_support/core_ext', the expectation is
that it would add certain methods to the core classes NOW. The
previous behaviour causes additional methods to be loaded the first
time you call `to_json`, which could cause nasty surprises and other
unplesant side-effects.
This change moves all core extensions in to core_ext/json. AS::JSON is
still autoloaded on first #to_json call, but since it nolonger
include the core extensions, it should address the aforementioned bug.
*Requiring core_ext/object/to_json now causes a deprecation warnning*
|
|
|
|
|
|
| |
Copy-edits
[ci skip]
|
|\
| |
| |
| | |
[ci skip] Documentation on how to create custom rake tasks.
|
| | |
|
|\ \
| | |
| | | |
[ci skip] Add missing setting locale code snippet.
|
| | |
| | |
| | |
| | | |
Now all links point to the correct line number.
|
| |/
| |
| |
| |
| |
| |
| |
| | |
This is for 3 Internationalizing your Application of i18n.md.
Missing the code as mentioned in 2.3, setting locale.
Without this, the example to add config/locales/pirate.yml will not work.
|
|\ \ |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
before:
```bash
$ rails generate migration AddDetailsToProducts price:decimal{5,2} supplier:references{polymorphic}
```
after:
```bash
$ rails generate migration AddDetailsToProducts 'price:decimal{5,2}' supplier:references{polymorphic}
```
|
| | |
| | |
| | | |
Change the plural of Deer word in the naming conventions
|
| | |
| | |
| | | |
There's a div that is generated in rails for a default search form and is not includen in the example.
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
The right command for doing that is Client.exists?id:[1,2,3]
Exists does not work like find method, in find method you can do Person.find(1, 2, 6) or Person.find([7, 17]) but not Person.exists?(1,2,3) or Person.exists?([1,2,3])
|
| | |
| | |
| | | |
In the example of join models, there are five models but in the explanation only consider Category, Post, Comment and Guest.
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | | |
|
| | |
| | |
| | | |
Active support --> Deprecations Code highlighted.
|
| | | |
|
| | | |
|
|\ \ \
| |_|/
|/| | |
[ci skip] Improves a sentence in guides/security
|
| | |
| | |
| | |
| | | |
Changed "... books make this wrong" to "... books get this wrong"
|
|\ \ \
| | | |
| | | | |
Use MiniTest::Unit::TestCase instead of Minitest::Test [ci skip]
|
| |/ /
| | |
| | |
| | |
| | |
| | |
| | | |
Since Rails 4.0.x is depending on Minitest 4.x, the constant won't be
available so the gist won't run.
[ci skip]
|
|/ /
| |
| |
| | |
Actually it's Ruby i18n link.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* Indent after private/protected
* Ruby >= 1.9 syntax for hashes
* Prefer method { do_stuff } instead of method{do_stuff} for single-line blocks.
[ci skip]
|
|\ \
| | |
| | | |
Document a difference between pluck and select [ci skip]
|
| |/
| |
| |
| | |
Explain that `pluck` differs from `select` in that it does not construct `ActiveRecord` objects and thus model-level overrides are unavailable.
|
|/
|
|
| |
dynamic finders [ci skip]
|
|\ |
|
| | |
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
- Right now the comment was not rendering properly.
# The Expires* directives requires the Apache module
`mod_expires` to be
# enabled.
- After this change -
# The Expires* directives requires the Apache module
# `mod_expires` to be enabled.
|
| |
| |
| |
| |
| |
| | |
and activerecord tests
[ci skip]
|
|\ \
| | |
| | | |
change reference of `Test::Unit` to `Minitest` [ci skip]
|
| | |
| | |
| | |
| | |
| | |
| | | |
Previous was misleading; current is more up to date.
[ci skip]
|
|\ \ \
| | | |
| | | |
| | | |
| | | | |
jetthoughts/11803_update_move_forbidden_exception_description_before_show
[Getting Started Guide] Move Forbidden attributes description before show post section [ci skip]
|
| |/ /
| | |
| | |
| | | |
[ci skip]
|
|/ / |
|
|\ \
| | |
| | | |
Remove whiny_nils config from the rails guides [ci skip]
|
| | |
| | |
| | |
| | |
| | |
| | | |
This option was removed from master.
[ci skip]
|
|\ \ \
| |/ /
|/| | |
Warning on doc for assets under lib|vendor not precompiling
|
| | | |
|