aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | Merge pull request #22182 from seanlinsley/patch-1Rafael França2015-11-041-0/+7
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | document `try!` in ActiveSupport core ext guide
| * | | | | | | document `try!` in ActiveSupport core ext guideSean Linsley2015-11-041-0/+7
|/ / / / / / / | | | | | | | | | | | | | | https://twitter.com/avdi/status/660141673993777156
* | | | | | | Merge pull request #22180 from usertesting/arbitrary-url-in-link-to-backRafael França2015-11-043-2/+33
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Don’t allow arbitrary data in back urls
| * | | | | | | Don’t allow arbitrary data in back urlsDamien Burke2015-11-033-2/+33
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `link_to :back` creates a link to whatever was passed in via the referer header. If an attacker can alter the referer header, that would create a cross-site scripting vulnerability on every page that uses `link_to :back` This commit restricts the back URL to valid non-javascript URLs. https://github.com/rails/rails/issues/14444
* | | | | | | formatting pass over Active Record changelog. [ci skip]Yves Senn2015-11-041-18/+20
| | | | | | |
* | | | | | | Merge pull request #22174 from metaskills/defsetupYves Senn2015-11-043-7/+6
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Update docs/comments to use setup/teardown blocks vs. methods. [ci skip]
| * | | | | | | Update docs/comments to use setup/teardown blocks vs. methods.Ken Collins2015-11-041-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Remove super for setup block. Not needed.
| * | | | | | | Update docs/comments to use setup/teardown blocks vs. methods.Ken Collins2015-11-033-6/+6
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | As discussed in the minitest-spec-rails issue (http://git.io/vlHxx) Rails uses setup/teardown callbacks. Defining `setup` or `teardown` methods vs. blocks will yield inconsistent behavior in the callback chain.
* | / / / / / Remove incorrect commentsAndrew White2015-11-041-4/+0
| |/ / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | Columns are no longer stored in an attribute since b8a533d. [ci skip]
* | | | | | Fix spelling error [ci skip]Andrew White2015-11-041-1/+1
| | | | | |
* | | | | | don't start a new process for every test fileAaron Patterson2015-11-031-8/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we can just reuse the parent process. We should figure out what files are commonly required among the test files and try to require them in the parent so that the require time cost is amortized across the processes.
* | | | | | Fix deprecation message when frame doesn't have absolute_pathRafael Mendonça França2015-11-031-1/+1
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | When a frame is an eval block without filename argument there is no absolute_path so the previous implementation would fail because `nil` doesn't responds to `start_with?`.
* | | | | Add tests to make sure mail_to work with nil and SafeBufferRafael Mendonça França2015-11-031-0/+14
| | | | |
* | | | | Merge pull request #18774 from ↵Jeremy Daer2015-11-0330-90/+179
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | yuki24/deprecate-original-exception-infavor-of-cause Deprecate exception#original_exception in favor of exception#cause
| * | | | | Deprecate exception#original_exception in favor of exception#causeYuki Nishijima2015-11-0330-90/+179
| | | | | |
* | | | | | Merge pull request #22164 from yui-knk/test_float_limitsAndrew White2015-11-032-12/+48
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add test_float_limits to mysql2
| * | | | | | Add test_float_limits to mysql2yui-knk2015-11-032-12/+48
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This test case was definded by 51de8cee82d61541725ff4c2462b083f37e64017. `float` and `double` is registered in abstract_mysql_adapter.rb, we should test not only for mysql adapter, but mysql2 adapter.
* | | | | | Merge pull request #22162 from Gaurav2728/added_instruction_for_rack_corsAndrew White2015-11-031-2/+4
|\ \ \ \ \ \ | |/ / / / / |/| | | | | added missing instructions for `rack-cors`
| * | | | | added missing instructions for `rack-cors`Gaurav Sharma2015-11-031-2/+4
|/ / / / / | | | | | | | | | | | | | | | | | | | | `config.middleware.insert_before` changes require to restart the server Also added missing `.` at the EOL.
* | | | | remove present? call; we do not need itAaron Patterson2015-11-021-1/+1
| | | | |
* | | | | Merge pull request #21841 from yui-knk/fix_migration_statusAndrew White2015-11-024-7/+80
|\ \ \ \ \ | | | | | | | | | | | | Make `db:migrate:status` to render `1_some.rb` format migrate files.
| * | | | | Make `db:migrate:status` to render `1_some.rb` format migrate files.yui-knk2015-11-024-7/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `1_valid_people_have_last_names.rb` and `20150823202140_create_users.rb` are valid migration file name. But `1_valid_people_have_last_names.rb` is rendered as `********** NO FILE **********` when `rake db:migrate:status`. Fix to this bug, this commit includes * define some API private methdos and a Constant `match_to_migration_filename?`, `parse_migration_filename`, and `MigrationFilenameRegexp` * use these methods in `db:migrate:status` task Example: These files are in `db/migrate` * 1_valid_people_have_last_names.rb * 20150819202140_irreversible_migration.rb * 20150823202140_add_admin_flag_to_users.rb * 20150823202141_migration_tests.rb * 2_we_need_reminders.rb * 3_innocent_jointable.rb we can migrate all of them. Before ```shell $ bundle exec rake db:migrate:status ... Status Migration ID Migration Name -------------------------------------------------- up 001 ********** NO FILE ********** up 002 ********** NO FILE ********** up 003 ********** NO FILE ********** up 20150819202140 Irreversible migration up 20150823202140 Add admin flag to users up 20150823202141 Migration tests ``` After ```shell $ bundle exec rake db:migrate:status ... Status Migration ID Migration Name -------------------------------------------------- up 001 Valid people have last names up 002 We need reminders up 003 Innocent jointable up 20150819202140 Irreversible migration up 20150823202140 Add admin flag to users up 20150823202141 Migration tests ```
* | | | | | Merge pull request #22156 from yui-knk/fix_test_mysqlAndrew White2015-11-021-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix test_database_created_by_root of mysql
| * | | | | | Fix test_database_created_by_root of mysqlyui-knk2015-11-021-1/+1
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `DEFAULT_CHARSET` and `DEFAULT_COLLATION` in `MySQLDatabaseTasks` was changed by 322068fe85278ea26e26da6dfd7c5612dab15a72. This test case also should be changed.
* | | | | | Merge pull request #22142 from r11runner/query-guide-first-last-default-scopeYves Senn2015-11-021-0/+4
|\ \ \ \ \ \ | |/ / / / / |/| | | | | [ci skip] querying guide methods first and last: mentioning the influence of the default scope
| * | | | | [ci skip] querying guide methods first and last: mentioning the influence of ↵r11runner2015-10-311-0/+4
| | |_|/ / | |/| | | | | | | | | | | | | the default scope
* | | | | Merge pull request #22152 from y-yagi/remove_sass-cache_from_gitignoreAndrew White2015-11-021-1/+0
|\ \ \ \ \ | | | | | | | | | | | | remove unnecessary `.sass-cache` from plugin's gitignore template
| * | | | | remove unnecessary `.sass-cache` from plugin's gitignore templateyuuji.yaginuma2015-11-021-1/+0
| |/ / / / | | | | | | | | | | | | | | | Since the sass cache is output to the `tmp/cache/sass`.
* | | | | Merge pull request #22133 from yui-knk/sanitize_sql_for_orderAndrew White2015-11-025-5/+30
|\ \ \ \ \ | | | | | | | | | | | | Define `sanitize_sql_for_order` for AR and use it inside `preprocess_…
| * | | | | Define `sanitize_sql_for_order` for AR and use it inside `preprocess_order_args`yui-knk2015-11-025-5/+30
|/ / / / / | | | | | | | | | | | | | | | This commit follows up of 6a6dbb4c51fb0c58ba1a810eaa552774167b758a.
* | | | | Merge pull request #22090 from kamipo/bigint_default_nilAndrew White2015-11-024-3/+36
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Allow bigint with default nil for avoiding auto increment primary key
| * | | | | Allow bigint with default nil for avoiding auto increment primary keyRyuta Kamizono2015-11-024-3/+36
|/ / / / / | | | | | | | | | | | | | | | Such as #10404, #18206.
* | | | | Merge pull request #22061 from kamipo/remove_default_charset_and_collationAndrew White2015-11-023-21/+13
|\ \ \ \ \ | | | | | | | | | | | | Remove `DEFAULT_CHARSET` and `DEFAULT_COLLATION`
| * | | | | Remove `DEFAULT_CHARSET` and `DEFAULT_COLLATION` in `MySQLDatabaseTasks`Ryuta Kamizono2015-11-023-21/+13
|/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f6ca7e4e75408bc42f515fc7206d6c6ff0dce7c6. The default collation of utf8 in MySQL is the `utf8_general_ci`, and this should not be changed. This is because, the better collation in the all locales is not exists, optimal collation in own application is not known other than themselves. The `utf8_unicode_ci` is known as Japanese killer in Japan, there are serious impacts in search of Japanese. MySQL implements the `utf8_unicode_ci` according to the Unicode Collation Algorithm (UCA) described at http://www.unicode.org/reports/tr10/, but the `utf8_unicode_ci` have only partial support for the UCA, only primary level key comparison implemented (also known as L1 (Base characters) comparison). Because L1 (Base characters) comparison does not distinguish between the presence or absence of the accent, if distinction of the accent is important there is a serious impact (e.g. Japanese). Example: ``` > SHOW CREATE TABLE `dicts`\G *************************** 1. row *************************** Table: dicts Create Table: CREATE TABLE `dicts` ( `word` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL, `meaning` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci 1 row in set (0.00 sec) > INSERT INTO `dicts` VALUES ('ハハ', 'mother'), ('パパ', 'father'); Query OK, 2 rows affected (0.00 sec) > SELECT * FROM `dicts` WHERE `word` = 'ハハ'; +--------+---------+ | word | meaning | +--------+---------+ | ハハ | mother | | パパ | father | +--------+---------+ 2 rows in set (0.00 sec) > CREATE UNIQUE INDEX `unique_index_word` ON `dicts`(`word`); ERROR 1062 (23000): Duplicate entry 'ハハ' for key 'unique_index_word' ``` We should omit the collation entirely rather than providing a default. Then the choice is the responsibility of the server and MySQL distribution.
* | | | | Merge pull request #22130 from k0kubun/left-joins-changelogAndrew White2015-11-021-0/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | Add CHANGELOG entry for #22125 [ci skip]
| * | | | | Add CHANGELOG entry for #22125 [ci skip]Takashi Kokubun2015-11-021-0/+5
|/ / / / /
* | | | | Merge pull request #22131 from yui-knk/move_test_to_inheritance_testAndrew White2015-11-022-80/+80
|\ \ \ \ \ | |_|/ / / |/| | | | Move some AR test cases to inheritance_test.rb
| * | | | Move some AR test cases to inheritance_test.rbyui-knk2015-10-312-80/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | These methods are defined in inheritance.rb * `abstract_class?` * `descends_from_active_record?` * `compute_type`
* | | | | Merge pull request #22149 from samphilipd/masterAndrew White2015-11-011-0/+5
|\ \ \ \ \ | | | | | | | | | | | | Update changelog for #22122
| * | | | | Update changelog for #22122Sam Davies2015-11-011-0/+5
|/ / / / /
* | | | | Merge pull request #22147 from jwworth/pull-request/double-stringRichard Schneeman2015-11-011-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Fix double word 'string' [ci skip]
| * | | | | Fix double word 'string' [ci skip]Jake Worth2015-11-011-1/+1
|/ / / / /
* | | | | Merge pull request #22083 from thejamespinto/idempotent-route-generatorAndrew White2015-11-013-1/+20
|\ \ \ \ \ | |_|/ / / |/| | | | Route generator should be idempotent
| * | | | Route generator should be idempotent - closes #22082Thiago Pinto2015-10-313-1/+20
| | | | |
* | | | | Merge branch 'master' of github.com:rails/docrailsVijay Dev2015-10-3114-28/+28
|\ \ \ \ \
| * | | | | Remove wrong period mark in `ActiveSupport::LogSubscriber` docs [ci skip]amitkumarsuroliya2015-10-111-1/+1
| | | | | |
| * | | | | Add missing punctuation mark in `ActiveSupport` docs [ci skip]amitkumarsuroliya2015-10-114-7/+7
| | | | | | | | | | | | | | | | | | It improves readability of docs
| * | | | | Fixed `ActiveSupport::NumberHelper` Outputs [ci skip]amitkumarsuroliya2015-10-111-2/+2
| | | | | |
| * | | | | Improved `KeyError` messages on bang version, since commit ↵amitkumarsuroliya2015-10-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | https://github.com/rails/rails/commit/e768c519fb6015e00961702a5165c6dab548a954 bang version produces `KeyError` [ci skip]
| * | | | | Revert "Corrected ActiveSupport `time_with_zone` outputs [ci skip]"Rafael Mendonça França2015-10-101-7/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit efbd62f0c5c927a08e860b318b7bb561b2602a98. Right now Eastern Time zone is on daylight saving, so the output in the documentation is different but this doesn't mean that it is wrong. Daylight savings only happen in 3 months in a year so it is better to use the normal time zone in the documentation.