aboutsummaryrefslogtreecommitdiffstats
path: root/guides
Commit message (Collapse)AuthorAgeFilesLines
* Errors can be indexed with nested attributesMichael Probber2015-04-171-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `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]
* [ci skip] Replace `list` with `array`yui-knk2015-04-181-1/+1
|
* [ci skip] Update code example of Enumerable#withoutyui-knk2015-04-171-1/+1
|
* add active job testing section [ci skip]David Fernandez2015-04-161-0/+7
|
* Correct small typo.Hank Beaver2015-04-151-1/+1
| | | | * files are written to hard "disk" not "disc".
* Fix typos and improve the documentationJon Atack2015-04-157-22/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* Merge pull request #19446 from ↵Zachary Scott2015-04-141-4/+6
|\ | | | | | | | | andersonDadario/fix_security_guide_captcha_03_21_2015 Fix security guide captcha 03 21 2015 [ci skip]
| * [ci skip] Fix for Security Guide - Captcha SectionAnderson Dadario2015-03-221-4/+6
| |
* | Removing GZip section since Sprockets 3.0 no longer create .gz files [ci skip]Andrey Nering2015-04-141-35/+0
| | | | | | | | | | - https://github.com/rails/sprockets/commit/14b3b2eddac4699c64c051888e3801732b9a4418 - https://github.com/rails/sprockets/issues/26
* | Merge pull request #19753 from jonatack/use-ruby-2-2-2Guillermo Iguaran2015-04-132-3/+3
|\ \ | | | | | | Upgrade to Ruby 2.2.2
| * | Upgrade to Ruby 2.2.2Jon Atack2015-04-142-3/+3
| | | | | | | | | | | | and fix the grammar in the ruby_version_check.rb user message.
* | | Merge branch 'master' of github.com:rails/docrailsVijay Dev2015-04-145-46/+32
|\ \ \
| * | | [ci skip] add missing file extensionMikhail Dieterle2015-04-101-1/+1
| | | |
| * | | [ci skip] format rake outputMikhail Dieterle2015-04-101-5/+3
| | | |
| * | | [ci skip] fix helper nameMikhail Dieterle2015-04-101-1/+1
| | | |
| * | | [ci skip] Wrap with double quotationyui-knk2015-04-101-1/+1
| | | |
| * | | [ci skip] Remove unnecessary linesyui-knk2015-04-011-2/+0
| | | |
| * | | [ci skip] Add `:`yui-knk2015-04-011-1/+1
| | | |
| * | | No need to mention unit tests in testing guide anymoreKir Shatrov2015-03-311-2/+0
| | | |
| * | | New test runner syntax in testing guideKir Shatrov2015-03-311-4/+4
| | | |
| * | | Suggest new hash syntax in testing guideKir Shatrov2015-03-311-2/+2
| | | |
| * | | Don't suggest `bin/rails test controllers`Kir Shatrov2015-03-311-1/+0
| | | |
| * | | Add missing "of" to testing guide.Hendy Tanata2015-03-301-1/+1
| | | |
| * | | Merge branch 'kirs'Matthew Draper2015-03-301-30/+23
| |\ \ \
| | * | | Switch to `bin/rails test` in testing guideKir Shatrov2015-03-301-30/+23
| | | | | | | | | | | | | | | rails/rails#18305
* | | | | Merge pull request #19742 from vngrs/config_autoload_paths_wrong_docCarlos Antonio da Silva2015-04-131-3/+1
|\ \ \ \ \ | | | | | | | | | | | | Fix the wrong documentation about config.autoload_paths [ci skip]
| * | | | | Fix the wrong documentation about config.autoload_paths [ci skip]Mehmet Emin İNAÇ2015-04-131-3/+1
| | | | | | | | | | | | | | | | | | | | | | | | config.autoload_paths is not changeable from environment specific configuration files.
* | | | | | Improve note about unique index and foreign key on has_one associationCarlos Antonio da Silva2015-04-131-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | Related to f1af967e0055a33c45071848a049ff342e9c291e. [ci skip]
* | | | | | Add note wrt foreign key constraint to ensure data integrityZachary Scott2015-04-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Thanks for patch @sgrif :trollface: Closes #18216
* | | | | | Apply comments from @rafaelfranca: we shouldn't recommend you use scaffold cssZachary Scott2015-04-121-9/+0
| | | | | | | | | | | | | | | | | | | | | | | | Closes #19492 and fixes #19453
* | | | | | Merge pull request #19564 from jonatack/counter_cache_docsZachary Scott2015-04-121-3/+11
|\ \ \ \ \ \ | | | | | | | | | | | | | | [skip ci] Fix counter_cache in the Rails Guides
| * | | | | | [skip ci] Fix counter_cache in the Rails GuidesJon Atack2015-03-281-3/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | Some copy edits for modifying View Paths [ci skip]Zachary Scott2015-04-121-5/+21
| | | | | | |
* | | | | | | Merge branch 'view_paths' of https://github.com/nishantmodak/rails into ↵Zachary Scott2015-04-121-1/+17
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | nishantmodak-view_paths
| * | | | | | view paths docs [ci skip]Nishant Modak2015-04-131-1/+17
| | | | | | |
* | | | | | | Merge pull request #19732 from wazery/patch-2Kasper Timm Hansen2015-04-121-2/+2
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | [ci skip] Update contributing guide
| * | | | | | | [ci skip] Update contributing guideIslam Wazery2015-04-121-2/+2
| | | | | | | |
* | | | | | | | Fix a few typos and wrap some lines [ci skip]Robin Dupret2015-04-121-3/+4
| | | | | | | |
* | | | | | | | remove reference to `register_javascript_expansion` and ↵yuuji.yaginuma2015-04-121-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `register_stylesheet_expansion` from guide [ci skip] These methods no longer exists.
* | | | | | | | Speed up Levenshtein by 50% and reduce 97% of memory usageYuki Nishijima2015-04-111-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | | | | Remove mention of super old defined_javascript_functions method [ci skip]Carlos Antonio da Silva2015-04-111-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was removed long ago: e358b1fce8fdcbac896dde08286be020420e843e.
* | | | | | | | Rename railties/bin to railties/exeIslam Wazery2015-04-111-2/+2
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | | | | | [ci skip] Remove `link_to_function` and `button_from_function` from guideseileencodes2015-04-111-21/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These methods were removed in cb9f7f4 and are no longer methods in the Rails codebase.
* | | | | | | [skip ci] primay_key -> primary_keyJon Atack2015-04-111-1/+1
| | | | | | |
* | | | | | | Copy edits for primary_key documentation in association guide. [ci skip]Zachary Scott2015-04-101-3/+4
| | | | | | |
* | | | | | | Merge branch 'belongs_to_primary_key_doc' of ↵Zachary Scott2015-04-101-0/+19
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/girishso/rails into girishso-belongs_to_primary_key_doc
| * | | | | | | added primary_key option documentation for belongs_to associationGirish S2014-09-231-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fixes issue #16698
* | | | | | | | [ci skip] Downcases filter namesyui-knk2015-04-101-3/+3
| | | | | | | |
* | | | | | | | Add Active Job to Configuring Guide [ci skip]Eliot Sykes2015-04-092-0/+60
| |/ / / / / / |/| | | | | |
* | | | | | | Fix URL rails-framework-hooksNishant Modak2015-04-071-1/+1
| | | | | | |