Commit Graph

49967 Commits

Author SHA1 Message Date
Hyonjee Joo
b181297ad7 Created rake restart task.
Fixes #18876. Rake restart touches `tmp/restart.txt` to restart
application on next request. Updated tests and documentation
accordingly.
2015-02-26 15:26:59 -05:00
Sean Griffin
38218929e9 Properly create through records when called with where
Various behaviors needed by associations (such as creating the through
record) are lost when `where` is called, since we stop having a
`CollectionProxy` and start having an `AssociationRelation` which does
not contain this behavior. I *think* we should be able to rm
`AssociationRelation`, but we have tests saying the changes required to
do that would be bad (Without saying why. Of course. >_>)

Fixes #19073.
2015-02-26 12:42:55 -07:00
Richard Schneeman
f069b41321 Merge pull request #18434 from brainopia/change_filter_on_rails_info_routes
Change filter on /rails/info/routes to use an actual path regexp from rails
2015-02-26 12:59:43 -06:00
Rafael Mendonça França
28778de2e0 Merge pull request #19095 from waseem/rails_runner_ruby_file
Section explaining how rails runner accepts code in a ruby file.
2015-02-26 14:37:12 -03:00
Kasper Timm Hansen
0b32beadf5 [ci skip] Add changelog entry for #18948. 2015-02-26 17:23:22 +01:00
Waseem Ahmad
c2c844e600 Section explaining how rails runner accepts code in a ruby file.
[ci skip]
2015-02-26 21:39:49 +05:30
Akira Matsuda
b940e9feea :nailcare: 2015-02-26 23:21:45 +09:00
Yves Senn
1d031ee27d Merge pull request #19088 from teeceepee/patch-1
Fix typos in ActionView::Helpers::FormBuilder comment [ci skip]
2015-02-26 09:06:54 +01:00
Yu Haidong
dda17ccc62 Fix typos in ActionView::Helpers::FormBuilder comment [ci skip] 2015-02-26 15:29:04 +08:00
Rafael Mendonça França
89e051ace3 Merge pull request #16738 from net-engine/guides-template-inheritance
Guides: Template Inheritance (new in guides, feature in since 3.1)
2015-02-25 20:34:05 -03:00
Rafael Mendonça França
eb2a8e317d Merge pull request #17601 from kamipo/support_any_unicode_charsets
Add `SchemaMigration.create_table` support any unicode charsets for MySQL.
2015-02-25 20:11:39 -03:00
Rafael Mendonça França
5c5d9417ca Merge pull request #17297 from rebyn/fix/17161-remove-objs-from-has_many-updates-fields
Add specs for adding-to/clear has_many collections’s behavior on `updated_at`
2015-02-25 19:59:31 -03:00
Ryuta Kamizono
3239b6a98a Add SchemaMigration.create_table support any unicode charsets for MySQL.
MySQL unicode support is not only `utf8mb4`.
Then, The index length problem is not only `utf8mb4`.

http://dev.mysql.com/doc/refman/5.6/en/charset-unicode.html

    SELECT * FROM information_schema.character_sets WHERE maxlen > 3;
    +--------------------+----------------------+------------------+--------+
    | CHARACTER_SET_NAME | DEFAULT_COLLATE_NAME | DESCRIPTION      | MAXLEN |
    +--------------------+----------------------+------------------+--------+
    | utf8mb4            | utf8mb4_general_ci   | UTF-8 Unicode    |      4 |
    | utf16              | utf16_general_ci     | UTF-16 Unicode   |      4 |
    | utf16le            | utf16le_general_ci   | UTF-16LE Unicode |      4 |
    | utf32              | utf32_general_ci     | UTF-32 Unicode   |      4 |
    +--------------------+----------------------+------------------+--------+
2015-02-26 07:57:53 +09:00
Rafael Mendonça França
026ce5ddf1 Merge pull request #15476 from JacobEvelyn/master
Use logger environment settings in Rails console.
2015-02-25 19:52:19 -03:00
schneems
6f0a69c589 fix bug in Levenshtein distance calculation
Bug was discovered and discussed in #18395.
2015-02-25 12:58:49 -06:00
Yves Senn
71fc789239 add CHANGELOG for f6e293ec54f02f83cdb37502bea117f66f87bcae. [ci skip] 2015-02-25 18:03:20 +01:00
Jeremy Kemper
f6e293ec54 Fix default headers in test responses
Fixes regression in #18423. Merge default headers for new responses,
but don't merge when creating a response from the last session request.

hat tip @senny ❤️
2015-02-25 09:49:25 -07:00
Rafael Mendonça França
2abed7af6e Merge pull request #19076 from nygrenh/truncate-words-fix
Fix a backtracking problem in String#truncate_words
2015-02-25 12:12:31 -03:00
Rafael Mendonça França
d6c34ce59f Merge pull request #19074 from Mession/fix_test_dependency_of_erb_template_partial_with_layout
Fix dependency tracker bug
2015-02-25 12:03:25 -03:00
Henrik Nygren
ece0d25c2b Fix a backtracking problem in String#truncate_words
Fixes #19070.
2015-02-25 17:02:22 +02:00
Rafael Mendonça França
68a2a67116 Merge pull request #18948 from kaspth/automatic-collection-caching
Merge multi_fetch_fragments.
2015-02-25 11:54:07 -03:00
Juho Leinonen
4640c346ea Fix dependency tracker bug 2015-02-25 14:57:29 +02:00
Abdelkader Boudih
5a6868b617 Merge pull request #19072 from y-yagi/mailer_doc
update docs to reflect that mailer generator add suffix to generated classes [ci skip]
2015-02-25 10:26:29 +00:00
yuuji.yaginuma
5ef18712c5 update docs to reflect that mailer generator add suffix to generated classes [ci skip] 2015-02-25 19:22:33 +09:00
Abdelkader Boudih
80ed46064d Merge pull request #19069 from robertzk/patch-1
fix typo [ci-skip]
2015-02-25 06:45:00 +00:00
Robert Krzyzanowski
0e9e9d62aa fix typo [ci-skip] 2015-02-25 00:25:58 -06:00
Aaron Patterson
149a1e16d4 cache quoted column names in SQLite3
we do this in other adapters, and it's a nice speed improvement
2015-02-24 18:28:00 -08:00
Aaron Patterson
4cd0da5c9a Merge pull request #19068 from pda/ar-translate-exception-class-no-log
AR: translate_exception_class() no longer logs error.
2015-02-24 16:26:24 -08:00
Arthur Nogueira Neves
27ce16aa9b Merge pull request #18936 from arthurnn/txn_callbacks
Spike on new transaction callbacks
2015-02-24 19:25:11 -05:00
Aaron Patterson
f4bee7ecbf Merge pull request #17426 from jpcody/fixture_associations_fix
Rely on through table name in has_many fixtures
2015-02-24 16:24:38 -08:00
Arthur Neves
45755135fe Rename tests 2015-02-24 19:16:45 -05:00
Arthur Neves
7d2a87281c Add before_commit
[fixes #18903]
2015-02-24 19:16:28 -05:00
Arthur Neves
4a1bb9d0ce Add transaction callbacks that wont enroll to the transaction.
Add after_commit_without_transaction_enrollment and
after_rollback_without_transaction_enrollment private callbacks so we
can create after_commit and after_rollback callbacks without having the
records automatic enrolled in the transaction.

[fixes #18904]
2015-02-24 19:13:56 -05:00
Paul Annesley
9c28529e71 AR: translate_exception_class() no longer logs error. 2015-02-24 15:44:37 -08:00
Jeremy Kemper
f4f94081dd Add a failing test demonstrating regression with HEAD requests to Rack apps, re #18764 2015-02-24 15:59:21 -07:00
Robin Dupret
803ef74f9b Tiny documentation edits [ci skip] 2015-02-24 22:22:15 +01:00
Sean Griffin
948424d556 Call attributes_for_update in _update_record w/ optimistic locking
Fixes #19057
2015-02-24 14:10:29 -07:00
Jeremy Kemper
26915a18b1 Fix c479480638508c20601af69ca46b5b606c2d5b4d to account for from_value -> from_clause in bdc5141652770fd227455681cde1f9899f55b0b9 2015-02-24 13:40:18 -07:00
Rafael Mendonça França
c479480638 Merge pull request #18744 from mfazekas/no-table-name-with-from
Fix appending table_name to select and group when used with subquery (fr...
2015-02-24 16:56:01 -03:00
Rafael Mendonça França
2bc72ae29c Merge pull request #19066 from courtenay/mysql_boolean_limit_19065
Fix mysql's schema.rb dumper so it does not include limit on emulated booleans
2015-02-24 16:04:26 -03:00
Court3nay
ee87dbe048 Fix mysql's schema.rb dumper so it does not include limit on emulated boolean tinyint(1) fields 2015-02-24 13:59:00 -05:00
Rafael Mendonça França
a0580e974b Merge pull request #19055 from ianks/model_name.to_json
activemodel: make .model_name json encodable
2015-02-24 15:04:20 -03:00
Ian Ker-Seymer
c5d62cb86d activemodel: make .model_name json encodable
Previously, calling `User.model_name.to_json` would result in an infinite
recursion as `.model_name` inherited its `.as_json` behavior from Object. This
patch fixes that unexpected behavior by delegating `.as_json` to :name.
2015-02-24 11:00:32 -07:00
Rafael Mendonça França
efc6d49114 Use other controller instead of sharing the controller 2015-02-24 14:59:28 -03:00
Rafael Mendonça França
f6a31f5321 Make TestController available to all test classes 2015-02-24 14:14:15 -03:00
Rafael Mendonça França
6976e1da07 Merge pull request #19060 from iainbeeston/deprecate-skip-action-callback
Deprecate `AbstractController::Callbacks#skip_action_callback`
2015-02-24 13:33:16 -03:00
Yves Senn
72c1557254 rework disable_referential_integrity for PostgreSQL.
[Toby Ovod-Everett & Andrey Nering & Yves Senn]

Closes #17726.
Closes #10939.

This patch makes three distinct modifications:

1. no longer fall back to disabling user triggers if system triggers can't be disabled
2. warn the user when referential integrity can't be disabled
3. restore aborted transactions when referential integrity can't be disabled

The motivation behind these changes is to make the behavior of Rails
transparent and less error-prone. To require superuser privileges is not optimal
but it's what Rails currently needs. Users who absolutely rely on disabling user triggers
can patch `disable_referential_integrity`.

We should investigate `SET CONSTRAINTS` as a possible solution which does not require
superuser privileges.

/cc @matthewd
2015-02-24 17:32:35 +01:00
Rafael Mendonça França
48dcaeab38 Merge pull request #19064 from kamipo/remove_unused_table
Remove unused table
2015-02-24 13:31:11 -03:00
Ryuta Kamizono
531063543b Remove unused table
`postgresql_xml_data_type` table is used from nowhere.
2015-02-25 01:19:59 +09:00
Rafael Mendonça França
762bfee4a2 Merge pull request #19062 from kamipo/move_back_new_column_definition_into_table_definition
Move back `new_column_definition` into `TableDefinition`
2015-02-24 13:17:25 -03:00