aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | | | | | Revert 88d08f2ec9f89ba431cba8d0c06ac9ebc204bbbbRafael Mendonça França2015-02-112-13/+25
| |_|/ / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This caused a performance regression since we were decided to do the nil check in run time not in the load time. See https://github.com/rails/rails/pull/15187#issuecomment-71760058
* | | | | | | | | | | | Remove the SQLite3 Binary subclassSean Griffin2015-02-112-28/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As far as I can tell, the original reason that this behavior was added has been sufficiently resolved elsewhere, as we no longer remove the encoding of strings coming out of the database.
* | | | | | | | | | | | Reduce object allocations in ActiveSupport::Subscribereileencodes2015-02-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Freezing the string literal reduces the number of objects allocated during integration test runs. AllocationTracer before: ``` [["/rack/lib/rack/utils.rb", 499, :T_STRING], [50939, 2737, 78553, 0, 13, 1783920]] [["/rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [44959, 0, 42633, 0, 2, 1670800]] [["/rack/lib/rack/utils.rb", 662, :T_STRING], [32979, 0, 31263, 0, 1, 1226009]] [["/rack/lib/rack/body_proxy.rb", 34, :T_ARRAY], [29988, 0, 28438, 0, 1, 1114320]] [["/rails/activesupport/lib/active_support/callbacks.rb", 165, :T_DATA], [29968, 0, 28422, 0, 2, 3675936]] ``` AllocationTracer after: ``` [["/rack/lib/rack/utils.rb", 499, :T_STRING], [50983, 4080, 67269, 0, 12, 1815600]] [["/rack/lib/rack/utils.rb", 662, :T_STRING], [33001, 0, 28420, 0, 2, 1230809]] [["/rack/lib/rack/body_proxy.rb", 34, :T_ARRAY], [29990, 0, 25812, 0, 1, 1118000]] [["/rails/activesupport/lib/active_support/subscriber.rb", 99, :T_STRING], [29986, 0, 25803, 0, 1, 1117840]] [["/rails/activesupport/lib/active_support/notifications/instrumenter.rb", 52, :T_HASH], [29984, 28, 26133, 0, 11, 4953280]]
* | | | | | | | | | | | Remove an unused option that I didn't mean to commit [ci skip]Sean Griffin2015-02-111-2/+1
| | | | | | | | | | | |
* | | | | | | | | | | | Remove most PG specific type subclassesSean Griffin2015-02-1114-91/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The latest version of the PG gem can actually convert the primitives for us in C code, which gives a pretty substantial speed up. A few cases were only there to add the `infinity` method, which I just put on the range type (which is the only place it was used). Floats also needed to parse `Infinity` and `NaN`, but it felt reasonable enough to put that on the generic form.
* | | | | | | | | | | | Merge pull request #18883 from ↵Sean Griffin2015-02-113-23/+46
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/fix_datetime_precision_dumping_zero_for_postgresql The datetime precision with zero should be dumped
| * | | | | | | | | | | | The datetime precision with zero should be dumpedRyuta Kamizono2015-02-113-23/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `precision: 0` was not dumped by f1a0fa9e19b7e4ccaea191fc6cf0613880222ee7. However, `precision: 0` is valid value for PostgreSQL timestamps.
* | | | | | | | | | | | | prefer `drop_table :table, if_exists: true` over explicit checks.Yves Senn2015-02-111-2/+2
| | | | | | | | | | | | |
* | | | | | | | | | | | | add test to ensure `remove_reference` with index and fk is invertable.Yves Senn2015-02-111-0/+5
| | | | | | | | | | | | |
* | | | | | | | | | | | | fix `remove_reference` with `foreign_key: true` on MySQL. #18664.Yves Senn2015-02-113-0/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MySQL rejects to remove an index which is used in a foreign key constraint: ``` ActiveRecord::StatementInvalid: Mysql2::Error: Cannot drop index 'index_copies_on_title_id': needed in a foreign key constraint: ALTER TABLE `copies` DROP `title_id` ``` Removing the constraint before removing the column (and the index) solves this problem.
* | | | | | | | | | | | | Merge pull request #18890 from kamipo/remove_cast_typeYves Senn2015-02-111-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Remove `cast_type` in `ColumnDefinition`
| * | | | | | | | | | | | | Remove `cast_type` in `ColumnDefinition`Ryuta Kamizono2015-02-111-1/+1
| | |_|/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is no longer needed.
* | | | | | | | | | | | | guides, various testing guide changes. [ci skip]Yves Senn2015-02-111-7/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | /cc @zzak
* | | | | | | | | | | | | Merge pull request #18363 from ↵Yves Senn2015-02-111-0/+16
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | andreynering/add-foreign-key-subsection-in-upgrading-guide Adding subsection on 'Upgrading' guide about foreign key support [ci skip]
| * | | | | | | | | | | | | Adding subsection on 'upgrading' guide about 4.2 foreign key support [ci skip]Andrey Nering2015-02-101-0/+14
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Merge pull request #18892 from robertzk/typo_in_rails_engine_rbZachary Scott2015-02-101-4/+4
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix some typos in railties/lib/rails/engine.rb [ci-skip]
| * | | | | | | | | | | | | | Fix some typos in railties/lib/rails/engine.rb [ci-skip]RobertZK2015-02-101-4/+4
|/ / / / / / / / / / / / / /
* | | | | | | | | | | | | | Merge pull request #18891 from robertzk/typo_in_rails_application_rbArthur Nogueira Neves2015-02-101-2/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix typo in Rails::Application#migration_railties documentation [ci-skip]
| * | | | | | | | | | | | | | Fix typo in Rails::Application#migration_railtiesRobertZK2015-02-101-2/+2
|/ / / / / / / / / / / / / /
* | | | | | | | | | | | | | Merge pull request #18889 from kamipo/use_kwargs_in_transactionRafael Mendonça França2015-02-111-6/+4
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / / / |/| | | | | | | | | | | | | Use keyword argument in `transaction`
| * | | | | | | | | | | | | Use keyword argument in `transaction`Ryuta Kamizono2015-02-111-6/+4
|/ / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The keys are already validated, so it is better to use the built-in feature to do this.
* | | | | | | | | | | | | Merge pull request #18884 from rails/fix-kwarg-on-staleRafael Mendonça França2015-02-102-1/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / / |/| | | | | | | | | | | | Fix wrong kwarg "record" from #18872
| * | | | | | | | | | | | Fix wrong kwarg "record" from #18872claudiob2015-02-102-1/+2
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR #18772 changed the parameters of `stale?` to use `kwargs`. [As for this comment](https://github.com/rails/rails/pull/18872/files#r24456288) the default value for the `etag` parameter should be `record`, not `nil`. This commit fixes the code and introduces a test that: - passed before #18872 - fails on the current master (after #18772) - passes again after setting the default value of `etag` to `record`.
* | | | | | | | | | | | Merge pull request #18872 from kaspth/kw-fresh_when-staleArthur Nogueira Neves2015-02-101-12/+10
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / |/| | | | | | | | | | | Convert stale? and fresh_when to use keyword arguments.
| * | | | | | | | | | | Convert stale? and fresh_when to use keyword arguments.Kasper Timm Hansen2015-02-101-12/+10
| | | | | | | | | | | |
* | | | | | | | | | | | Dont check bundler output on plugin generator testArthur Neves2015-02-101-4/+2
| | | | | | | | | | | |
* | | | | | | | | | | | Actually fix the buildSean Griffin2015-02-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Like for real this time. I checked.
* | | | | | | | | | | | Merge pull request #18877 from prathamesh-sonpatki/ar-changelog-typos-2Rafael Mendonça França2015-02-101-2/+2
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed typos in ActiveRecord CHANGELOG [ci skip]
| * | | | | | | | | | | | Fixed typos in ActiveRecord CHANGELOG [ci skip]Prathamesh Sonpatki2015-02-111-2/+2
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #12257 from vipulnsward/end_on_find_in_batchesRafael Mendonça França2015-02-104-13/+50
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add an option `end` to `find_in_batches`
| * | | | | | | | | | | | | Add an option `end_at` to `find_in_batches`Vipul A M2015-02-094-13/+50
| | |_|_|_|_|/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | that complements the `start`parameter to specify where to stop batch processing
* | | | | | | | | | | | | Fix the buildSean Griffin2015-02-101-1/+1
| |/ / / / / / / / / / / |/| | | | | | | | | | |
* | | | | | | | | | | | Refactor microsecond precision to be database agnosticSean Griffin2015-02-1011-84/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The various databases don't actually need significantly different handling for this behavior, and they can achieve it without knowing about the type of the object. The old implementation was returning a string, which will cause problems such as breaking TZ aware attributes, and making it impossible for the adapters to supply their logic for time objects.
* | | | | | | | | | | | Merge pull request #18860 from ↵Rafael Mendonça França2015-02-101-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | alex-handley/enhancement/dependent_documentation_fix Documentation Fix: Corrects explanation of what happens when dependent is not set
| * | | | | | | | | | | | [ci skip] corrects documentation for the default dependent behaviourAlex Handley2015-02-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default the foreign key will remain set with the parent id after destroy is fired.
* | | | | | | | | | | | | Maintain a consistent order in `ActiveRecord::Base#attributes`Sean Griffin2015-02-102-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #18871
* | | | | | | | | | | | | Merge pull request #18808 from carlosramireziii/i18n-doc-updateRobin Dupret2015-02-101-0/+19
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / / |/| | | | | | | | | | | | Document lazy lookup behavior for controllers [ci skip]
| * | | | | | | | | | | | Document lazy lookup behavior for controllersCarlos Ramirez III2015-02-031-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull request #7082 added lazy lookup to controllers using the translate method, but the documentation still stated that it was available for views only. [ci skip]
* | | | | | | | | | | | | Change `LockingType` to use `DelegateClass`Sean Griffin2015-02-091-1/+1
| |_|_|/ / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Significantly faster than `SimpleDelegator`.
* | | | | | | | | | | | Merge pull request #18841 from yuki24/remove-warning-from-av-tags-translatorRafael Mendonça França2015-02-091-1/+3
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Remove warning from ActionView::Helpers::Tags::Translator
| * | | | | | | | | | | | Remove warning from ActionView::Helpers::Tags::TranslatorYuki Nishijima2015-02-081-1/+3
| | |_|/ / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the following warning: /GitHub/rails/actionview/lib/action_view/helpers/tags/translator.rb:19: warning: private attribute?
* | | | | | | | | | | | Merge pull request #18849 from kamipo/array_type_is_a_part_of_sql_typeSean Griffin2015-02-092-19/+4
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / |/| | | | | | | | | | | An array type is a part of `sql_type`
| * | | | | | | | | | | An array type is a part of `sql_type`Ryuta Kamizono2015-02-082-19/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `sql_type` is reused in `lookup_cast_type`. If making it a part of `sql_type` when handled array option first, it isn't necessary to do again.
* | | | | | | | | | | | tests, reset global to previous value.Yves Senn2015-02-091-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The default of the global might change. It's better to reset it to what it was than a hardcoded value.
* | | | | | | | | | | | Merge pull request #18839 from ↵Yves Senn2015-02-091-10/+0
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | yuki24/remove-warning-from-generators-named-base-test Remove warning from generator named base test
| * | | | | | | | | | | | Remove warning from generator named base testYuki Nishijima2015-02-081-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the following warning: railties/test/generators/named_base_test.rb:9: warning: method redefined; discarding old pluralize_table_names activesupport/lib/active_support/core_ext/class/attribute.rb:86: warning: previous definition of pluralize_table_names was here railties/test/generators/named_base_test.rb:9: warning: method redefined; discarding old pluralize_table_names= activesupport/lib/active_support/core_ext/class/attribute.rb:83: warning: previous definition of pluralize_table_names= was here
* | | | | | | | | | | | | Merge pull request #18840 from yuki24/remove-warning-from-plugin-generatorYves Senn2015-02-091-3/+3
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / |/| | | | | | | | | | | | Remove warning from Plugin Generator
| * | | | | | | | | | | | Remove warning from Plugin GeneratorYuki Nishijima2015-02-081-3/+3
| | |/ / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the following warning: rails/railties/lib/rails/generators/rails/plugin/plugin_generator.rb:321: warning: shadowing outer local variable - content
* | | | | | | | | | | | Merge pull request #18764 from tsun1215/masterAndrew White2015-02-083-0/+33
|\ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / |/| | | | | | | | | | | Explicitly ignored wildcard verbs from head_routes
| * | | | | | | | | | | Explicitly ignored wildcard verbs from head_routesTerence Sun2015-02-083-0/+33
|/ / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In match_head_routes, deleted the routes in which request.request_method was empty (matches all HTTP verbs) when responding to a HEAD request. This prevents catch-all routes (such as Racks) from intercepting the HEAD request. Fixes #18698