| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| | |
Add .try to prevent undefined method error for NilClass.
|
| |
| |
| | |
The previous example of how to permit a hash of unknown keys used .tap, but had the side effect of logging an "Unpermitted parameters" message despite being a successful workaround. The proposed workaround is ever so slightly better, imo, because it won't result in an "Unpermitted parameters" message being logged.
|
|\ \ |
|
| | | |
|
| | | |
|
| | |
| | |
| | | |
see here 4d4ff531b8807ee88a3fc46875c7e76f613956fb
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | | |
See rails/rails#12608
|
| | | |
|
| | |
| | |
| | | |
Code Highlighted
|
| | | |
|
| | |
| | |
| | | |
Code style adherence
|
| | | |
|
| | | |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
So strings can be humanized without being capitalized:
'employee_salary'.humanize # => "Employee salary"
'employee_salary'.humanize(capitalize: false) # => "employee salary"
|
| | |
| | |
| | |
| | |
| | |
| | | |
I think it's confusing to say "Use them in views without escaping." We
use all keys in views without escaping - the escaping is done for us
automatically _unless_ we call html_safe or the key ends in _html.
|
| | | |
|
| | | |
|
|\ \ \
| | | |
| | | | |
[ci skip] Add actions to shallow table, change a tense in sentence, add
|
| | | | |
|
| | | | |
|
| | | | |
|
|\ \ \ \
| |/ / /
|/| | | |
Eagerload active_support/json/encoding in active_support/core_ext/object/to_json
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
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*
|
| | | |
| | | |
| | | |
| | | | |
[ci skip]
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Reason: WIP guides are not in the index because they are partial
work pushed to the repo. Either there is someone working on them
or else the work was interrupted.
Guides are added to the index page when they are finished, the
author considers the draft to be complete, someone reviews them,
and overall they are considered to be good for users to read.
This reverts commit eefc03a8069bddfe31751c4bd4fb1804e7f33c2c.
|
|\ \ \ \
| | | | |
| | | | | |
[Guides] Active Model Basics [ci skip]
|
| | | | | |
|
|\ \ \ \ \
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
jeradphelps/configurable_schema_migrations_table_name
Configurable name for schema_migrations table
Conflicts:
activerecord/CHANGELOG.md
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
name of the schema migrations table can be configured.
consolidated test_schema_migrations_table_name tests
Added changelog entry
edited changelog
removed commented lines
removed reader
ensure the schema migrations table is reset at end of test
added entry to configuration guide
guides typo and changelog order
|
| |_|_|_|/
|/| | | | |
|
|/ / / / |
|
|\ \ \ \
| | | | |
| | | | | |
Add sass globbing to asset pipeline docs [ci skip]
|
| | |/ /
| |/| |
| | | |
| | | | |
[ci skip]
|
| | | |
| | | |
| | | |
| | | | |
Also clean up some trailing spaces on line 1143-1146.
|
|\ \ \ \
| |_|_|/
|/| | | |
Rephrase ActiveRecord transaction rollback warning [ci skip]
|
| | | |
| | | |
| | | |
| | | | |
[ci skip]
|
|\ \ \ \
| |/ / /
|/| | | |
|
| | | | |
|
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Removed ```The `size` helper is an alias for `length`.``` line. If you use this "nonexist" helper, you will get an error message like this:
```
ArgumentError: Unknown validator: 'SizeValidator'
...
```
Maybe wanted to mean ```validates_size_of``` helper as an alias for ```validates_length_of``` helper.
|
|\ \ \ \
| | | | |
| | | | | |
Keep code consistent with previous code blocks.
|
| | | | |
| | | | |
| | | | | |
[ci skip]
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Some fixes in docs [ci skip]
|
| |/ / / /
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Update a link to point to right section in api docs
Fix a typo
|
| | | | |
| | | | |
| | | | | |
A small mistake found in the line of ```The default error is "can't be empty"``` for ```:presence``` helper. ```empty``` word changed to ```blank```.
|
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
This reverts commit e5f5a838b96a362534d9bb60d02334439ed9784c, reversing
changes made to d7567f3290a50952494e9213556a1f283a6cf3a0.
|
|/ / / / |
|
| | | |
| | | |
| | | |
| | | | |
and remove a TODO. [ci skip]
|
| | | | |
|