aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | Missing require for strip_heredocAkira Matsuda2017-01-171-0/+1
|/ / / / / /
* | | | | | Add CHANGELOG entry for #27701Andrew White2017-01-161-0/+4
| | | | | |
* | | | | | Merge pull request #27701 from kamipo/translate_foreign_key_violationAndrew White2017-01-162-45/+74
|\ \ \ \ \ \ | | | | | | | | | | | | | | Translate Foreign Key violation to the specific exception for SQLite3 adapter
| * | | | | | Translate Foreign Key violation to the specific exception for SQLite3 adapterRyuta Kamizono2017-01-162-45/+74
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Raise `ActiveRecord::InvalidForeignKey` when a record cannot be inserted or updated because it references a non-existent record for SQLite3 adapter.
* | | | | | | Merge pull request #27692 from y-yagi/make_render_work_with_ac_paramsEileen M. Uchitelle2017-01-162-2/+5
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | make `render` work with AC::Params
| * | | | | | | make `render` work with AC::Paramsyuuji.yaginuma2017-01-152-2/+5
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In 4.2, since AC::Params inherited `Hash`, processing in the case of `Hash` was done. But in 5.x, since AC::Params does not inherit `Hash`, need to add care for AC::Params. Related to 00285e7cf75c96553719072a27c27e4ab7d25b40
* | | | | | | Merge pull request #27695 from metaskills/sqlserver-testparticipationEileen M. Uchitelle2017-01-163-4/+4
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Allow SQLServerAdapter To Opt Into A Few Tests
| * | | | | | | Allow SQLServerAdapter to opt into a few tests.Ken Collins2017-01-163-4/+4
| | |/ / / / / | |/| | | | |
* | | | | | | Merge pull request #27699 from kenta-s/update-comment-for-scrubber-usageKasper Timm Hansen2017-01-161-6/+4
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | Update comment for Scrubber usage [ci skip]
| * | | | | | Update comment for Scrubber usage [ci skip]kenta-s2017-01-161-6/+4
| | |/ / / / | |/| | | |
* | | | | | Added test to ensure that we dont break #to_h again when trying to restore ↵David Heinemeier Hansson2017-01-161-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | the speed-up from 26dd9b26ab7317f94fd285245879e888344143b2 (cc: @fxn)
* | | | | | Revert "significant speedup of AC::Parameters#permit" ↵David Heinemeier Hansson2017-01-162-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | [26dd9b26ab7317f94fd285245879e888344143b2] as it broke Parameters#to_h on at least fields_for-style nested params.
* | | | | | Add missing requireDavid Heinemeier Hansson2017-01-161-0/+1
|/ / / / / | | | | | | | | | | | | | | | This was preventing the test suite from being run in isolation
* | | | | Should do nothing hereAkira Matsuda2017-01-161-1/+1
| | | | |
* | | | | Merge pull request #27683 from eugeneius/update_counters_empty_touch_testKasper Timm Hansen2017-01-151-0/+9
|\ \ \ \ \ | | | | | | | | | | | | Add test for update_counters with empty touch array
| * | | | | Add test for update_counters with empty touchEugene Kenny2017-01-151-0/+9
| |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a regression test for a fix included in https://github.com/rails/rails/commit/bad9bfbea6d6af9dc28583e08a49492668087393. Without that change, this test would fail with: ActiveRecord::StatementInvalid: SQLite3::SQLException: near "WHERE": syntax error: UPDATE "topics" SET "replies_count" = COALESCE("replies_count", 0) - 1, WHERE "topics"."id" = ?
* | | | | Revert "Don't guard against `touch: []`."Kasper Timm Hansen2017-01-151-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `timestamp_attributes_for_updates_in_model` returns an empty array when a model has no `updated_at` or `updated_on`. So my previously thought uncommon case is a lot more likely now. This reverts commit a0a1ede8c2eb6436571eae8778033162d1f9dcc3.
* | | | | Merge pull request #27601 from y-yagi/make_work_all_commands_from_engineKasper Timm Hansen2017-01-1510-54/+124
|\ \ \ \ \ | | | | | | | | | | | | Make all rails commands work in engine
| * | | | | improve server default options testyuuji.yaginuma2017-01-091-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test was added in 221b4ae. 221b4ae modified to return the same result even if `Rails::Server#default_options` is called more than once. Therefore, also use `Rails::Server#default_options` instead of `ServerCommand#default_options` in test.
| * | | | | make all rails commands work in engineyuuji.yaginuma2017-01-099-51/+121
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, all rails commands can be executed in engine, but `server`, `console`, `dbconsole` and `runner` do not work. This make all rails commands work in engine. Related to #22588
* | | | | | Merge pull request #27618 from kamipo/fix_uuid_default_nilKasper Timm Hansen2017-01-152-20/+37
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix UUID primary key with default nil in legacy migration
| * | | | | | Fix UUID primary key with default nil in legacy migrationRyuta Kamizono2017-01-092-1/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | UUID primary key with no default value feature (#10404, #18206) was lost in legacy migration caused by #25395 got merged. Restore the feature again in legacy migration.
| * | | | | | Should test uuid legacy migration without `supports_pgcrypto_uuid?`Ryuta Kamizono2017-01-091-19/+17
| |/ / / / /
* | | | | | Revert "Merge pull request #27686 from koic/friendly_bigdecimal_inspect"Kasper Timm Hansen2017-01-152-16/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The exact inspect output of a BigDecimal is out of scope for what we're trying to communicate about `dup` and `duplicable?` here. Adding two examples distracts is disctracting, so keep the docs from before since our minimal version is Ruby 2.2.2. [ Koichi ITO, Jon Moss, Kasper Timm Hansen ] This reverts commit 2163874dedaf83e67599c2930c2686caa165fbad, reversing changes made to 46fdbc5290335ed38fa9fe2b6b0ef8abe4eccb1b.
* | | | | | Don't guard against `touch: []`.Kasper Timm Hansen2017-01-151-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Closes #27683. Seeing a code sample that leads to what we're guarding against: ```ruby Topic.update_counters(1, replies_count: 1, touch: []) ``` It doesn't look like a case people would ever intentionally end up with. Thus we're better off sparing the conditional. Note: it could happen if a method returns an empty array that's then passed to `update_counters` and its touchy friends. But `[].presence` can fix that once people see their query blow up. [ Eugene Kenny & Kasper Timm Hansen ]
* | | | | | Merge pull request #27690 from y-yagi/remove_unused_requireKasper Timm Hansen2017-01-151-1/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | remove unused require
| * | | | | | remove unused requireyuuji.yaginuma2017-01-151-1/+0
| | |/ / / / | |/| | | | | | | | | | | | | | | | `InlineAdapter` is not used from 1f8558f.
* | | | | | Merge pull request #27686 from koic/friendly_bigdecimal_inspectJon Moss2017-01-152-1/+16
|\ \ \ \ \ \ | | | | | | | | | | | | | | Several representation of BigDecimal has changed in Ruby 2.4.0+ [ci skip]
| * | | | | | Several representation of BigDecimal has changed in Ruby 2.4.0+ [ci skip]Koichi ITO2017-01-152-1/+16
| |/ / / / / | | | | | | | | | | | | | | | | | | cf. https://github.com/ruby/bigdecimal/pull/42
* | | | | | Revert "bundle u mocha"Akira Matsuda2017-01-162-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 66e5b9d3f47cd52143be0e6a216ade34bb52b9cc. We're seeing some test failures in AR postgresql tests
* | | | | | bundle u mochaAkira Matsuda2017-01-152-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | I see no reason not to use the newest stable version.
* | | | | | Allow render locals to be assigned to instance variablesAndrew White2017-01-154-1/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In #26672 we blocked use of Ruby keywords as identifiers for view locals but inadvertently broke the use of instance variable names as identifiers. Whilst not explicitly documented this behavior has been around for a long time and there's no need to break it now. Fixes #27480.
* | | | | | Merge pull request #27684 from y-yagi/remove_ununnecessary_addition_of_libKasper Timm Hansen2017-01-151-1/+0
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | remove unnecessary addition of `lib`
| * | | | | remove unnecessary addition of `lib`yuuji.yaginuma2017-01-151-1/+0
| |/ / / / | | | | | | | | | | | | | | | | | | | | `TestTask` add `lib` directory by default. Ref: https://github.com/ruby/rake/blob/master/lib/rake/testtask.rb#L39..L41
* | | | | Merge pull request #27687 from ↵Ryuta Kamizono2017-01-151-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | | | | | | kenta-s/fix-broken-example-code-in-output_safety_helper Fix broken sample code in action_view/helpers/output_safety_helper.rb…
| * | | | Fix broken sample code in action_view/helpers/output_safety_helper.rb [ci skip]kenta-s2017-01-151-1/+1
|/ / / /
* | | | ZOMG worst typo in my life :scream:Akira Matsuda2017-01-151-1/+1
| | | |
* | | | It would be safer not to totally undef core classes' respond_to_missing?Akira Matsuda2017-01-152-2/+12
| | | | | | | | | | | | | | | | instead, rewrite them to no-op
* | | | `respond_to_missing?` should fallback to `super` where method_missing could ↵Akira Matsuda2017-01-152-2/+2
| | | | | | | | | | | | | | | | call `super`
* | | | AS::StringInquirer#respond_to_missing? should fallback to superAkira Matsuda2017-01-153-3/+19
| | | | | | | | | | | | | | | | in case String or any other ancestor class' respond_to_missing? was defined.
* | | | This test wasn't actually an effective regression testAkira Matsuda2017-01-151-4/+5
| | | |
* | | | Merge pull request #27660 from akihiro17/updates-timestampKasper Timm Hansen2017-01-144-7/+32
|\ \ \ \ | | | | | | | | | | Add the touch option to ActiveRecord#increment! and decrement!
| * | | | Add the touch option to ActiveRecord#increment! and decrement!akihiro172017-01-144-7/+32
| | | | | | | | | | | | | | | | | | | | | | | | | Supports the `touch` option from update_counters. The default behavior is not to update timestamp columns.
* | | | | Unused &block parameterAkira Matsuda2017-01-151-1/+1
| | | | |
* | | | | AS::ArrayInquirer#respond_to_missing? should fallback to superAkira Matsuda2017-01-153-1/+20
| | | | | | | | | | | | | | | | | | | | in case Array or any other ancestor class' respond_to_missing? was defined.
* | | | | Merge pull request #27680 from kamipo/fix_scope_for_createKasper Timm Hansen2017-01-141-1/+1
|\ \ \ \ \ | | | | | | | | | | | | `type_condition` should be overwritten by `create_with_value` in `scope_for_create`
| * | | | | `type_condition` should be overwritten by `create_with_value` in ↵Ryuta Kamizono2017-01-151-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `scope_for_create` `type_condition` should be overwritten by `create_with_value`. So `type` in `create_with_value` should be a string because `where_values_hash` keys are converted to string. Fixes #27600.
* | | | | Merge pull request #27679 from lcpriest/patch-1Arthur Nogueira Neves2017-01-131-4/+4
|\ \ \ \ \ | | | | | | | | | | | | Small spelling error
| * | | | | Small spelling errorLachlan Priest2017-01-141-4/+4
|/ / / / / | | | | | | | | | | existing_acrnoyms -> existing_acronyms
* | | | | Fix pool_from_any_process to use most recent speceileencodes2017-01-132-1/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a process is forked more than once, the pool was grabbing the oldest spec, not the most recent spec. This wasn't noticed before because most folks are lilely forking the process only once. If you're forking the process multiple times however the wrong spec name will be returned and an incorrect connection will be used for the process. This fixes the issue by reversing the list of spec names so we can grab the most recent spec rather than the oldest spec.