aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Enable number_to_percentage to keep the number's precision by allowing ↵Jack Xu2013-08-283-16/+31
| | | | | | :precision to be nil number_helper.number_to_percentage(1000, precision: nil) # => "1000%"
* 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`
| * | Restore the use of `#add_to_target` for nested attribute updates on existing ↵Ben Woosley2013-08-123-15/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | records, and don't bother updating the association if the update is going to be rejected anyway. This requires adding a `skip_callbacks` argument to `#add_to_target` so that we don't call the callbacks multiple times in this case, which is functionally an application of existing association data, rather than an addition of a new record to the association.
| * | Fix interactions between :before_add callbacks and nested attributes assignmentDr.(USA) Joerg Schray2013-08-123-11/+168
|/ / | | | | | | | | Issue #1: :before_add callback is called when nested attributes assignment assigns to existing record if the association is not yet loaded Issue #2: Nested Attributes assignment does not affect the record in the association target when callback triggers loading of the association
* | Merge pull request #11846 from gaurish/jdbc-upgradeGuillermo Iguaran2013-08-111-6/+7
|\ \ | | | | | | Upgrade ActiveRecord-JDBC-Adapter to v1.3 for better compatibility with ActiveRecord 4
| * | Upgrade ActiveRecord-JDBC-Adapter to master branchGaurish Sharma2013-08-121-6/+7
| | | | | | | | | | | | | | | Switch to master branch which provides Version 1.3.x of AR-JDBC adapter. It strives to provide ActiveRecord 4.x compatibility (as well as still supporting 2.3 and 3.x) from a single code base. It's a recommended update for all AR-JDBC 1.2.x users.
* | | chmod -xAkira Matsuda2013-08-124-0/+0
|/ /
* | only reconnect if there was already an active connectionAaron Patterson2013-08-111-1/+4
| | | | | | | | | | If you're using an in-memory database for the test database, reconnecting will lose all information that schema:load did for us.
* | Merge pull request #11826 from etipton/enable_extensions_revertibleRafael Mendonça França2013-08-103-1/+16
|\ \ | | | | | | Make 'enable_extension' revertible
| * | Make 'enable_extension' revertibleEric Tipton2013-08-103-1/+16
| |/ | | | | | | | | If 'enable_extension' is used in a migration's 'change' method, use 'disable_extension' on down migration (and vice-versa).
* | Merge pull request #11799 from njakobsen/fix-controller-filter-callbacksRafael Mendonça França2013-08-103-1/+17
|\ \ | | | | | | Execute conditional procs on controller filters only for current action
| * | Execute conditional procs on controller filters only for current action.Nicholas Jakobsen2013-08-103-1/+17
| | | | | | | | | | | | | | | | | | :only and :except options for controller filters are now added before :if and :unless. This prevents running :if and :unless procs when not on the specified. Closes #11786.
* | | Merge pull request #11830 from cr0t/masterJosé Valim2013-08-101-0/+8
|\ \ \ | |_|/ |/| | Fixed small mistake in the engines docs
| * | Add author_name field to post_params to the engines docsSergey Kuznetsov2013-08-101-0/+8
|/ /
* | Merge pull request #11820 from vipulnsward/remove_s2bRafael Mendonça França2013-08-096-37/+4
|\ \ | | | | | | Remove redundant `string_to_binary` from type-casting
| * | Remove redundant `string_to_binary` from type-castingVipul A M2013-08-096-37/+4
|/ /
* | Merge pull request #11815 from yaotti/patch-1Yves Senn2013-08-081-1/+1
|\ \ | | | | | | Fix a broken link [ci skip]
| * | Fix a broken linkHiroshige Umino2013-08-091-1/+1
|/ /
* | Merge pull request #11806 from jetthoughts/change_model_term_by_simple_wordCarlos Antonio da Silva2013-08-081-1/+1
|\ \ | | | | | | Remove using of suffix with term. [ci skip]
| * | Remove using of suffix with term. [ci skip]Paul Nikitochkin2013-08-081-1/+1
|/ /
* | Merge pull request #11802 from ko1/fix_field_encoding_for_mysqlAaron Patterson2013-08-074-3/+14
|\ \ | | | | | | Set field encoding to client_encoding for mysql adapter.
| * | Set field encoding to client_encoding for mysql adapter.Koichi Sasada2013-08-084-3/+14
| | |
* | | cast hstore values on write to be consistent with reading from the db.Yves Senn2013-08-084-4/+34
|/ /
* | Merge pull request #11331 from vipulnsward/remove_conditionalAaron Patterson2013-08-071-8/+1
|\ \ | | | | | | Remove conditional, results are always an instance of `ActiveRecord::Result`
| * | Remove conditional, since results are always an instance of ↵Vipul A M2013-07-061-8/+1
| | | | | | | | | | | | `ActiveRecord::Result`
* | | use `skip` so we can see what tests are not runAaron Patterson2013-08-081-6/+5
| |/ |/|