aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge pull request #27664 from kenta-s/fix-typo-in-asset-tag-helperप्रथमेश Sonpatki2017-01-131-1/+1
|\ \ | | | | | | Fix typo extention -> extension [ci skip]
| * | Fix typo extention -> extension [ci skip]kenta-s2017-01-131-1/+1
|/ /
* | Merge pull request #27656 from y-yagi/fix_method_name_in_renderer_docप्रथमेश Sonpatki2017-01-121-1/+2
|\ \ | | | | | | fix method name in `Renderer` doc [ci skip]
| * | fix method name in `Renderer` doc [ci skip]yuuji.yaginuma2017-01-121-1/+2
|/ / | | | | | | `ActionController::Renderer.defaults` was removed in 2db7304
* | Add duration constructors for use in Numeric extensionsAndrew White2017-01-124-35/+77
| | | | | | | | | | The Numeric extensions like 1.day, 1.month, etc. shouldn't know how the internals of ActiveSupport::Duration works.
* | Add additional tests for #27610Andrew White2017-01-121-1/+38
| | | | | | | | | | | | | | Since 1.month no longer equals 30.days add some tests to ensure that addition maintains the same day in the month or is the last day in the month if the month has less days than the current day. Also add a test for the behaviour of 12.months == 1.year.
* | Reduce string objects by using \ instead of + or << for concatenating stringsAkira Matsuda2017-01-1231-567/+567
| | | | | | | | (I personally prefer writing one string in one line no matter how long it is, though)
* | beginrescueendAkira Matsuda2017-01-121-5/+3
| |
* | Merge pull request #27610 from Envek/fix_and_speed_up_duration_parsingAndrew White2017-01-128-22/+59
|\ \ | | | | | | Fix inconsistent parsing of Durations with both months and years
| * | Fix inconsistent results when parsing large durations and constructing ↵Andrey Novikov2017-01-098-22/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | durations from code ActiveSupport::Duration.parse('P3Y') == 3.years # It should be true Duration parsing made independent from any moment of time: Fixed length in seconds is assigned to each duration part during parsing. Changed duration of months and years in seconds to more accurate and logical: 1. The value of 365.2425 days in Gregorian year is more accurate as it accounts for every 400th non-leap year. 2. Month's length is bound to year's duration, which makes sensible comparisons like `12.months == 1.year` to be `true` and nonsensical ones like `30.days == 1.month` to be `false`. Calculations on times and dates with durations shouldn't be affected as duration's numeric value isn't used in calculations, only parts are used. Methods on `Numeric` like `2.days` now use these predefined durations to avoid duplicating of duration constants through the codebase and eliminate creation of intermediate durations.
* | | Merge pull request #27652 from y-yagi/remove_unused_requireRafael França2017-01-113-6/+0
|\ \ \ | | | | | | | | remove unused requires
| * | | remove unused requiresyuuji.yaginuma2017-01-123-6/+0
| | | | | | | | | | | | | | | | Related to 0129ca2eeb6d5b2ea8c6e6be38eeb770fe45f1fa, f7782812f7e727178e4a743aa2874c078b722eef, f9ed83321ac1d1902578a0aacdfe55d3db754219
* | | | Revert "Merge pull request #27586 from maclover7/jm-fix-27584"Rafael Mendonça França2017-01-112-11/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 5eff7a9ca7bb2ee7f16db1ab4d11cebe28757ba5, reversing changes made to 5f03172f54a58a57a48a3121562beb2cef866cbe. Reason: It caused a regression. The test case is on the PR.
* | | | Merge pull request #27646 from palkan/chore/upd-gitignoreRafael França2017-01-111-0/+1
|\ \ \ \ | | | | | | | | | | Add .byebug_history to .gitignore
| * | | | [ci skip] Add .byebug_history to .gitignorepalkan2017-01-111-0/+1
| | | | |
* | | | | Merge branch 'master' of github.com:rails/docrailsVijay Dev2017-01-117-17/+17
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: railties/lib/rails/generators.rb
| * | | | | `meta-data` --> `metadata`Jon Moss2016-12-311-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Removes space from the word; is now spelled in the standard way. [ci skip]
| * | | | | Small grammar fixes in `Rails::Paths`Jon Moss2016-12-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
| * | | | | Small grammar fixes in `Rails::Info`Jon Moss2016-12-201-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
| * | | | | Capitalize RakeJon Moss2016-12-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
| * | | | | Capitalize Ruby and small grammar fixJon Moss2016-12-191-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
| * | | | | Capitalize Rack gem nameJon Moss2016-12-191-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
| * | | | | Capitalize Thor gem nameJon Moss2016-12-192-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | Merge pull request #27644 from kenta-s/fix-grammar-in-http-parametersप्रथमेश Sonpatki2017-01-111-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix grammar in action_dispatch/http/parameters.rb [ci skip]
| * | | | | | Fix grammar in action_dispatch/http/parameters.rb [ci skip]kenta-s2017-01-111-1/+1
|/ / / / / /
* | | | | | Merge pull request #27642 from kou/fix-indentAndrew White2017-01-111-1/+1
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Fix indent
| * | | | | Fix indentKouhei Sutou2017-01-111-1/+1
| | | | | |
* | | | | | Current default Rails app encoding "utf-8" looks more like a W3C charset ↵Akira Matsuda2017-01-112-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | than a ruby encoding
* | | | | | Use Encoding::UTF_8 constant for default_{internal,external} in the testsAkira Matsuda2017-01-114-8/+8
|/ / / / /
* | | | | Use already defined Encoding constant rather than freezing a StringAkira Matsuda2017-01-111-1/+1
| | | | |
* | | | | Make ActionDispatch::Request.parameter_parsers public APIRafael Mendonça França2017-01-111-1/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is the proper way to configure custom parameters parser and it was being recommended in the deprecation for ActionDispatch::ParamsParser. [ci skip]
* | | | | Merge pull request #27639 from scottgonzalez/validator-typoRafael França2017-01-101-2/+2
|\ \ \ \ \ | |_|/ / / |/| | | | Fix typo
| * | | | Fix typoScott González2017-01-101-2/+2
|/ / / /
* | | | Merge pull request #27613 from ↵Kasper Timm Hansen2017-01-101-0/+3
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | prathamesh-sonpatki/add-missing-entry-to-release-notes Add missing release notes entry for https://github.com/rails/rails/commit/f02a35b86efea24f1e2ab684bc8081ced5eb3b1a [ci skip]
| * | | | Add missing release notes entry for ↵Prathamesh Sonpatki2017-01-091-0/+3
| | |_|/ | |/| | | | | | | | | | https://github.com/rails/rails/commit/f02a35b86efea24f1e2ab684bc8081ced5eb3b1a [ci skip]
* | | | Merge pull request #27628 from y-yagi/revert_27619Kasper Timm Hansen2017-01-101-5/+0
|\ \ \ \ | | | | | | | | | | Revert "Merge pull request #27619 from dixpac/add_missing_generator_test
| * | | | Revert "Merge pull request #27619 from dixpac/add_missing_generator_test"yuuji.yaginuma2017-01-101-5/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 8cb3cdffdb70f3575518d24ea96ec891e40d21d0, reversing changes made to 3bc747bd8676dc940b531067e2861dcd4ac28efc. Reason: This test already exists in `SharedGeneratorTests`. Ref: https://github.com/rails/rails/blob/master/railties/test/generators/shared_generator_tests.rb#L109..L112 https://github.com/rails/rails/blob/master/railties/test/generators/app_generator_test.rb#L55..L56
* | | | | Merge pull request #27616 from jnicklas/time-travel-with-subclassesAndrew White2017-01-102-5/+24
|\ \ \ \ \ | | | | | | | | | | | | Make time travel work with subclasses of Time/Date/Datetime
| * | | | | Make time travel work with subclasses of Time/Date/DatetimeJonas Nicklas2017-01-102-5/+24
| | |/ / / | |/| | | | | | | | | | | | | | | | | | Closes #27614 Previously when calling `now` on a subclass of e.g. `Time` it would return an instance of `Time` instead of returning an instance of the subclass. This way, we always return the correct class.
* | | | | oops! :scream_cat:Akira Matsuda2017-01-101-1/+1
| | | | |
* | | | | Use temporary connection pool for the tests clearing AR::Base's ↵Akira Matsuda2017-01-101-59/+92
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | active_connections clearing AR::Base's active_connections on the "primary" pool loses connections to the in_memory DB when running sqlite3_mem tests
* | | | | Reconnecting AR::Base's connection breaks sqlite3_mem testsAkira Matsuda2017-01-101-2/+6
| | | | | | | | | | | | | | | | | | | | so let's test with a tiny inner-class model instead
* | | | | sqlite3_mem tests are broken since 79887593c18919fed49f441d64236362cb755872Akira Matsuda2017-01-101-0/+2
| |/ / / |/| | | | | | | | | | | | | | | since 79887593c18919fed49f441d64236362cb755872, create_all task recreates the connection to AR::Base which doesn't connect to the in_memory database that is set up for tests
* | | | Merge pull request #27621 from dylanahsmith/mysql2-nil-connection-testYves Senn2017-01-101-1/+2
|\ \ \ \ | | | | | | | | | | activerecord/test: Fix Mysql2ConnectionTest#test_execute_after_disconnect
| * | | | activerecord/test: Fix Mysql2ConnectionTest#test_execute_after_disconnectDylan Thacker-Smith2017-01-091-1/+2
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mysql2ConnectionTest#test_execute_after_disconnect was originally added to catch a NoMethodError occuring in execute when the Mysql2Adapter has a nil `@connection`. Pull request #26869 removed the error message check in that test because the error message changed in the mysql2 gem, which caused the test to fail. Now the test wouldn't catch the original bug since the NoMethodError would get turned into a ActiveRecord::StatementInvalid exception. Check the cause of the StatementInvalid exception to make sure it is of the correct type.
* | | | Merge pull request #27622 from kamipo/improve_deprecation_messageRafael França2017-01-092-3/+3
|\ \ \ \ | | | | | | | | | | Improve deprecation message for deprecated reflection class name
| * | | | Improve deprecation message for deprecated reflection class nameRyuta Kamizono2017-01-101-1/+1
| | | | |
| * | | | Suppress deprecation message to `has_and_belongs_to_many` only onceRyuta Kamizono2017-01-101-2/+2
| |/ / / | | | | | | | | | | | | | | | | Passing a class to `has_and_belongs_to_many` show deprecation message three times. It is enough only once.
* | | | Merge pull request #27619 from dixpac/add_missing_generator_testGuillermo Iguaran2017-01-091-0/+5
|\ \ \ \ | |/ / / |/| | | Test `--skip-git` generator option
| * | | Test `--skip-git` generator optiondixpac2017-01-091-0/+5
| | | |