| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
`has_many` can now take `index_errors: true` as an
option. When this is enabled, errors for nested models will be
returned alongside an index, as opposed to just the nested model name.
This option can also be enabled (or disabled) globally through
`ActiveRecord::Base.index_nested_attribute_errors`
E.X.
```ruby
class Guitar < ActiveRecord::Base
has_many :tuning_pegs
accepts_nested_attributes_for :tuning_pegs
end
class TuningPeg < ActiveRecord::Base
belongs_to :guitar
validates_numericality_of :pitch
end
```
- Old style
- `guitar.errors["tuning_pegs.pitch"] = ["is not a number"]`
- New style (if defined globally, or set in has_many_relationship)
- `guitar.errors["tuning_pegs[1].pitch"] = ["is not a number"]`
[Michael Probber, Terence Sun]
|
| |
|
| |
|
| |
|
|
|
|
| |
* files are written to hard "disk" not "disc".
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is a squash of the following commits, from first to last:
-
Fix minor, random things I’ve come across lately that individually
did not seem worth making a PR for, so I saved them for one commit.
One common error is using “it’s” (which is an abbreviation of “it is”)
when the possessive “its” should be used for indicating possession.
-
Changes include the name of a test, so remove the `[skip ci]` (thanks @senny).
-
Line wrap the changes at 80 chars and add one more doc fix.
-
Add a missing line wrap in the Contributing to Ruby on Rails Guide.
-
Line wrap the `TIP` section in the Contributing to Ruby on Rails Guide as well.
Rendering the guide locally with `bundle exec rake guides:generate` did
not show any change in on-screen formatting after adding the line wrap.
The HTML generated is (extra line added to illustrate where the line
wrap takes place):
<div class="info"><p>Please squash your commits into a single commit
when appropriate. This
simplifies future cherry picks and also keeps the git log
clean.</p></div>
-
Squash commits.
|
|\
| |
| |
| |
| | |
andersonDadario/fix_security_guide_captcha_03_21_2015
Fix security guide captcha 03 21 2015 [ci skip]
|
| | |
|
| |
| |
| |
| |
| | |
- https://github.com/rails/sprockets/commit/14b3b2eddac4699c64c051888e3801732b9a4418
- https://github.com/rails/sprockets/issues/26
|
|\ \
| | |
| | | |
Upgrade to Ruby 2.2.2
|
| | |
| | |
| | |
| | | |
and fix the grammar in the ruby_version_check.rb user message.
|
|\ \ \ |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| | | | |
|
| |\ \ \ |
|
| | | | |
| | | | |
| | | | | |
rails/rails#18305
|
|\ \ \ \ \
| | | | | |
| | | | | | |
Fix the wrong documentation about config.autoload_paths [ci skip]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
config.autoload_paths is not changeable from environment specific configuration files.
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Related to f1af967e0055a33c45071848a049ff342e9c291e. [ci skip]
|
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Thanks for patch @sgrif :trollface:
Closes #18216
|
| | | | | |
| | | | | |
| | | | | |
| | | | | | |
Closes #19492 and fixes #19453
|
|\ \ \ \ \ \
| | | | | | |
| | | | | | | |
[skip ci] Fix counter_cache in the Rails Guides
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
In the AR Associations Guide, this PR fixes:
- The counter_cache declaration is now shown only in the `belongs_to`
association.
- The docs stated that the counter_cache declaration needs to be on the
`has_many` side; now corrected to the `belongs_to` side.
- Split the custom column explanation out to a separate paragraph.
- Simplify the NOTE because it is true both with and without a custom
column name.
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| |_|/ / / / /
|/| | | | | |
| | | | | | | |
nishantmodak-view_paths
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | | |
[ci skip] Update contributing guide
|
| | | | | | | | |
|
| | | | | | | | |
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
`register_stylesheet_expansion` from guide [ci skip]
These methods no longer exists.
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
Calculating -------------------------------------
each_char 924.000 i/100ms
each_codepoint 1.381k i/100ms
-------------------------------------------------
each_char 9.320k (¡Þ 5.1%) i/s - 47.124k
each_codepoint 13.857k (¡Þ 3.6%) i/s - 70.431k
Comparison:
each_codepoint: 13857.4 i/s
each_char: 9319.5 i/s - 1.49x slower
The full report can be found here:
https://gist.github.com/yuki24/a80988f35aceac76f1d5
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
It was removed long ago: e358b1fce8fdcbac896dde08286be020420e843e.
|
|/ / / / / / /
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
That will match the new Bundler executables convention.
Bundler Blog Post: http://bundler.io/blog/2015/03/20/moving-bins-to-exe.html
Also updated the necessary tests.
|
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | |
| | | | | | | |
These methods were removed in cb9f7f4 and are no longer methods in the
Rails codebase.
|
| | | | | | | |
|
| | | | | | | |
|
|\ \ \ \ \ \ \
| | | | | | | |
| | | | | | | |
| | | | | | | | |
https://github.com/girishso/rails into girishso-belongs_to_primary_key_doc
|
| | | | | | | |
| | | | | | | |
| | | | | | | |
| | | | | | | | |
fixes issue #16698
|
| | | | | | | | |
|
| |/ / / / / /
|/| | | | | | |
|
| | | | | | | |
|