aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | Merge pull request #11920 from dlam/patch-1Santiago Pastorino2013-08-171-1/+1
|\ \ \ \ \ \ \ \ | |_|_|_|_|_|_|/ |/| | | | | | | Fixed grammar error in ordered_options documention.
| * | | | | | | Fixed grammar error in ordered_options documention.Dustin Lam2013-08-171-1/+1
|/ / / / / / /
* | | | | | | Merge pull request #11059 from robin850/improve-test-guideXavier Noria2013-08-161-6/+64
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Improve the testing guide [ci skip]
| * | | | | | | Improve the testing guide [ci skip]Robin Dupret2013-06-251-6/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve the "Testing Rails Applications" guide adding a section for testing helpers and a little note about associations with ActiveRecord and YAML fixtures. Also add a link to Fixture Builder ; yet another replacement for fixtures such as Machinist or FactoryGirl.
* | | | | | | | Merge pull request #11910 from brendon/masterCarlos Antonio da Silva2013-08-161-1/+1
|\ \ \ \ \ \ \ \ | |_|_|_|_|/ / / |/| | | | | | | Use binary mode to write uploaded files [ci skip]
| * | | | | | | Use binary mode to write uploaded files [ci skip] See: ↵Brendon Muir2013-08-161-1/+1
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | http://stackoverflow.com/a/4988984/129798 for an explanation for why this is required for Ruby 1.9.
* | | | | | | fix build error caused by #11900.Yves Senn2013-08-151-1/+1
| | | | | | |
* | | | | | | Merge pull request #11900 from onlymejosh/add_less_to_rake_todosYves Senn2013-08-153-1/+7
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Adding LESS to rake notes
| * | | | | | | Adding LESS to rake notesJosh Crowder2013-08-153-1/+7
|/ / / / / / /
* | | | | | | Merge pull request #11897 from wangjohn/fixing_multiple_word_inverse_detectionJosé Valim2013-08-144-2/+19
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Fixing multi-word automatic inverse detection.
| * | | | | | | Fixing multi-word automatic inverse detection.wangjohn2013-08-154-2/+19
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, ActiveRecord models with multiple words cannot have their inverse associations detected automatically.
* | | | | | | Merge pull request #11887 from raysrashmi/typo_fixCarlos Antonio da Silva2013-08-141-3/+3
|\ \ \ \ \ \ \ | |_|_|_|_|_|/ |/| | | | | | Typo Fix[ci skip]
| * | | | | | Typo Fix[ci skip]Rashmi Yadav2013-08-141-3/+3
|/ / / / / /
* | | | | | Merge pull request #11574 from jetthoughts/11552_rescue_on_invalid_inet_assignYves Senn2013-08-143-1/+37
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix assign ip address with invalid values raise exception
| * | | | | | Rescue invalid ip address exceptions on assign.Paul Nikitochkin2013-08-143-1/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In order that set attribute should not be bang method
* | | | | | | Merge pull request #11886 from ↵Yves Senn2013-08-141-28/+28
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | | | | | | | | | | | | | | | jetthoughts/remove_redundant_assert_from_datatype_test Removed redundant asserts for assigns attribute operation
| * | | | | | Removed redundant asserts for assigns attribute operationPaul Nikitochkin2013-08-141-28/+28
|/ / / / / /
* | | | | | document `assert_not_XYZ` in place of `refute_XYZ`.Yves Senn2013-08-141-10/+10
| | | | | |
* | | | | | Merge pull request #11617 from swooop/doc_sanitizeXavier Noria2013-08-141-0/+66
|\ \ \ \ \ \ | | | | | | | | | | | | | | Added SanitizeHelper to rails guide docs [ci skip]
| * | | | | | Added SanitizeHelper to rails guide docs [ci skip]Toby Sims2013-07-291-0/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added SanitizeHelper to rails guide docs [ci skip] Added SanitizeHelper to rails guide docs update [ci skip]
* | | | | | | Merge pull request #11544 from prathamesh-sonpatki/namespaced_routes_testYves Senn2013-08-143-1/+58
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Generate namespaced routes correctly for generators. Fix for #11532
| * | | | | | | Generate namespaced routes correctly for generators. Fix for #11532Prathamesh Sonpatki2013-08-143-1/+58
| | | | | | | |
* | | | | | | | test-case for fixed issue #11870.Yves Senn2013-08-141-0/+4
| | | | | | | |
* | | | | | | | Merge pull request #11756 from zilkey/masterYves Senn2013-08-131-0/+13
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | added String#to_date documentation to Rails 4 upgrade guide [ci skip]
| * | | | | | | added String#to_date documentation to Rails 4 upgrade guideJeff Dean2013-08-061-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | Merge pull request #11807 from jetthoughts/11804_actions_are_public_methodsSteve Klabnik2013-08-131-0/+4
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Add description of action in Getting Started Guide [ci skip]
| * | | | | | | | #11804: Add description of action in Getting Started GuidePaul Nikitochkin2013-08-131-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip] Closes #11804
* | | | | | | | | Merge pull request #11847 from AJ-Acevedo/masterSteve Klabnik2013-08-131-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Updated outdated initialization guide [ci skip]
| * | | | | | | | | Updated outdated initialization guide [ci skip]AJ Acevedo2013-08-131-1/+1
| | | | | | | | | |
* | | | | | | | | | Add String#remove(pattern) as a short-hand for the common pattern of ↵David Heinemeier Hansson2013-08-133-0/+19
| |/ / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | String#gsub(pattern, '')
* | | | | | | | | Merge pull request #11868 from rajcybage/fix_refuteRafael Mendonça França2013-08-132-4/+4
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | using assert_not instead of refute
| * | | | | | | | | using assert_not instead of refuteRajarshi Das2013-08-132-4/+4
|/ / / / / / / / /
* | | | | | | | | Merge pull request #11861 from ↵José Valim2013-08-131-0/+13
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | sadjow/improve-doc-translations-active-record-models Add plural form example for AR I18n section [ci skip]
| * | | | | | | | | Add plural form example for AR I18n section [ci skip]Sadjow Leão2013-08-131-0/+13
|/ / / / / / / / /
* | | | | | | | | renames the :abort deprecation behaviour to :raiseXavier Noria2013-08-133-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | That is a better name, thanks @jeremy.
* | | | | | | | | fixes typo in CHANGELOGXavier Noria2013-08-131-1/+1
| | | | | | | | |
* | | | | | | | | defines a new :abort deprecation behaviour that raisesXavier Noria2013-08-133-5/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See the CHANGELONG message in the patch for further details.
* | | | | | | | | Merge pull request #11856 from dchelimsky/refactor-duration-inspectSteve Klabnik2013-08-121-7/+7
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Refactor Duration#inspect
| * | | | | | | | | Refactor Duration#inspectDavid Chelimsky2013-08-121-7/+7
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In preparing https://github.com/rails/rails/pull/11855, it took me a minute to understand what was going on due to naming (parts refers first to an attr_accessor, then to a local, and is then reassigned), but also because the iterator conditionally builds nulls and then removes them. I refactored to something much more functional-looking that I find easier to read, but you may or may not. If you do, great! Enjoy! If not, oh well, I tried. Can't win 'em all :) Rationale: * no name conflict between local var and attr_accessor * no reassignment of local var * algorithm spelled out in steps * unused items in initial list filtered out early * empty-list case handled early instead of reassigning local var * no duplication of formatting strings ("0 seconds") Benchmarks (after PR #11855 merged): 10000.times do 1.second.inspect end original #inspect 0.350000 0.000000 0.350000 ( 0.354709) 0.330000 0.000000 0.330000 ( 0.331885) 0.330000 0.000000 0.330000 ( 0.334441) refactored #inspect 0.340000 0.000000 0.340000 ( 0.340080) 0.340000 0.010000 0.350000 ( 0.345069) 0.330000 0.000000 0.330000 ( 0.335873) 10000.times do (1.day + 1.month + 2.minutes + 1.day).inspect end original #inspect 0.400000 0.000000 0.400000 ( 0.403027) 0.400000 0.000000 0.400000 ( 0.403781) 0.390000 0.000000 0.390000 ( 0.387596) refactored #inspect 0.400000 0.010000 0.410000 ( 0.399792) 0.400000 0.000000 0.400000 ( 0.404145) 0.400000 0.000000 0.400000 ( 0.403820)
* | | | | | | | | Merge pull request #11855 from dchelimsky/chop-is-fasterRafael Mendonça França2013-08-121-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Use chop instead of singularize in Duration#inspect
| * | | | | | | | | Use chop instead of singularize in Duration#inspectDavid Chelimsky2013-08-121-1/+1
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Even though singularize tells a better story, chop is more than 50% faster and is all that is necessary in the case of Duration#inspect, in which all of the candidates for chopping appear in the same method and are all singularized by removing the final 's'. Benchmarks: 10000.times do 1.second.inspect end original #inspect 0.740000 0.000000 0.740000 ( 0.739065) 0.740000 0.000000 0.740000 ( 0.741458) 0.740000 0.010000 0.750000 ( 0.744011) refactored #inspect 0.330000 0.000000 0.330000 ( 0.333390) 0.330000 0.000000 0.330000 ( 0.331013) 0.320000 0.000000 0.320000 ( 0.330103) 10000.times do (1.day + 1.month + 2.minutes + 1.day).inspect end original #inspect 0.790000 0.000000 0.790000 ( 0.794624) 0.770000 0.000000 0.770000 ( 0.774577) 0.770000 0.010000 0.780000 ( 0.771295) refactored #inspect 0.390000 0.000000 0.390000 ( 0.392921) 0.400000 0.000000 0.400000 ( 0.397412) 0.370000 0.000000 0.370000 ( 0.379660)
* | | | | | | | | Merge pull request #11823 from fomede/add-jquery-ujs-reference-linkSteve Klabnik2013-08-121-1/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Add events reference link to the text about jquery-ujs [ci skip]
| * | | | | | | | | Add events reference link to the text about jquery-ujs [ci skip]Sadjow Leão2013-08-121-1/+1
| | | | | | | | | |
* | | | | | | | | | Merge pull request #11852 from prijutme4ty/guide_additionSteve Klabnik2013-08-121-0/+6
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Added comment to a guide about necessity of `:dependent` option for asso... [ci skip]
| * | | | | | | | | | Added comment to a guide about necessity of `:dependent` option for ↵Ilya Vorontsov2013-08-121-0/+6
| | |/ / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | associations with NOT NULL constraint
* | | | | | | | | | Merge pull request #11838 from vipulnsward/drop_extra_varSteve Klabnik2013-08-121-2/+2
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | drop extra variable
| * | | | | | | | | | drop extra variableVipul A M2013-08-121-2/+2
| | |/ / / / / / / / | |/| | | | | | | |
* | | | | | | | | | Use assert_not rather than refutePiotr Sarnacki2013-08-121-5/+5
| | | | | | | | | |
* | | | | | | | | | Merge pull request #11525 from Empact/nested_attributes_with_callbacks_bugPiotr Sarnacki2013-08-124-11/+172
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | Improve #5476 - "Nested attributes with callbacks bugfix" to use add_to_target and clearer tests
| * | | | | | | | | Refactor NestedAttributesWithCallbacksTest for clarityBen Woosley2013-08-121-67/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1) Use `assert` and `refute` where possible. 2) Separately include the setup, subject, and assertions in each test - don't hide the tested call in an assertion method. 3) Name things based on their role rather than incidental facts about them - e.g. `@bird[1]` -> `bird_to_destroy`. `bird2_deletion_attributes` -> `destroy_bird_attributes`. 4) Use more succinct naming where possible - e.g. `birds_with_callback` -> `birds_with_add`, `@pirate_with_two_birds` -> `@pirate`