aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
| * | | | | | | Remove unnecessary `set_inverse_instance` in finder methodsRyuta Kamizono2016-08-021-6/+2
| | |_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because `scope` (`target_scope`) is a `AssociationRelation`. `AssociationRelation` handles `set_inverse_instance`. https://github.com/rails/rails/blob/v5.0.0/activerecord/lib/active_record/association_relation.rb#L31-L33
* | | | | | | Add 4.2.Z back to the maintenance listRafael Mendonça França2016-08-021-1/+1
| |_|/ / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some Rails core members agreed to continue to maintain 4.2 until 5.1 is released. [ci skip]
* | | | | | Show supported DBs first in `rails new --help`Akira Matsuda2016-08-031-5/+5
| | | | | |
* | | | | | Remove extra connection pool creationArthur Neves2016-08-021-1/+0
| | | | | |
* | | | | | Merge branch 'master' of github.com:rails/docrailsVijay Dev2016-08-024-4/+12
|\ \ \ \ \ \
| * | | | | | Removed reference to callback_terminator.rb in docsIain Beeston2016-07-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | That file has been removed and replaced with new_framework_defaults.rb
| * | | | | | Fix documentation of `index` option for the `add_reference` method [ci skip]Prathamesh Sonpatki2016-07-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - Followup of https://github.com/rails/rails/pull/23179.
| * | | | | | The `to_query` method on Array objects uses `key[] as the prefix, not ↵Prathamesh Sonpatki2016-07-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | `_key_[]` [ci skip]
| * | | | | | Add `config.assets.quiet` to configuration guide [ci skip]Prathamesh Sonpatki2016-07-101-0/+2
| | | | | | |
| * | | | | | Add note about `config.annotations.register_directories` option in the ↵Prathamesh Sonpatki2016-07-101-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | guides [ci skip] - Followup of #25692.
* | | | | | | Fix wrong assignment.Kasper Timm Hansen2016-08-021-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Screwed up both the left and right hand sides!
* | | | | | | Set `always_permitted_parameters`.Kasper Timm Hansen2016-08-021-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The tests were written with the common false value seen in Rails apps, show that intent in the code. Should also fix the build on 5-0-stable.
* | | | | | | Move the YAML hook closer to `init_with`.Kasper Timm Hansen2016-08-021-8/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looked odd, so completely detached from the other necessary part of the implementation.
* | | | | | | Replace implicit formats with a case statement.Kasper Timm Hansen2016-08-021-7/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The coder that Psych passes in has a `tag` method we can use to detect which serialization format we're reviving for. Use it and make it clearer alongside the `load_tags` fiddling.
* | | | | | | Let Psych 2.0.9+ deserialize 2.0.8 serialized parameters.Kasper Timm Hansen2016-08-022-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we were to serialize an `ActionController::Parameters` on Psych 2.0.8, we'd get: ```yaml --- !ruby/hash:ActionController::Parameters key: :value ``` Because 2.0.8 didn't store instance variables, while 2.0.9 did: https://github.com/tenderlove/psych/commit/8f84ad0fc711a82a1040def861cb121e8985fd4c That, coupled with 2.0.8 calling `new` instead of `allocate` meant parameters was deserialized just fine: https://github.com/tenderlove/psych/commit/af308f8307899cb9e1c0fffea4bce3110a1c3926 However, if users have 2.0.8 serialized parameters, then upgrade to Psych 2.0.9+ and Rails 5, it would start to blow up because `initialize` will never be called, and thus `@parameters` will never be assigned. Hello, `NoMethodErrors` on `NilClass`! :) To fix this we register another variant of the previous serialization format and take it into account in `init_with`. I've tested this in our app and previously raising code now deserializes like a champ. I'm unsure how to test this in our suite because we use Psych 2.0.8 and don't know how to make us use 2.0.9+ for just one test.
* | | | | | | Merge pull request #26017 from ↵Kasper Timm Hansen2016-08-022-0/+51
|\ \ \ \ \ \ \ | |_|/ / / / / |/| | | | | | | | | | | | | | | | | | | | kaspth/parameters-yaml-format-backwardscompatibility Make Parameters support legacy YAML encodings.
| * | | | | | Make Parameters support legacy YAML encodings.Kasper Timm Hansen2016-08-012-0/+51
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By changing ActionController::Parameter's superclass, Rails 5 also changed the YAML serialization format. Since YAML doesn't know how to handle parameters it would fallback to its routine for the superclass, which in Rails 4.2 was Hash while just Object in Rails 5. As evident in the tags YAML would spit out: 4.2: !ruby/hash-with-ivars:ActionController::Parameters 5.0: !ruby/object:ActionController::Parameters Thus when loading parameters YAML from 4.2 in Rails 5, it would parse a hash dump as it would an Object class. To fix this we have to provide our own `init_with` to be aware of the past format as well as the new one. Then we add a `load_tags` mapping, such that when the YAML parser sees `!ruby/hash-with-ivars:ActionController::Parameters`, it knows to call our `init_with` function and not try to instantiate it as a normal hash subclass.
* | | | | | Merge pull request #25986 from ↵Sean Griffin2016-08-011-29/+7
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/remove_unnecessary_methods_for_null_relation Remove unnecessary methods for `NullRelation`
| * | | | | | Remove unnecessary methods for `NullRelation`Ryuta Kamizono2016-07-291-29/+7
| | |/ / / / | |/| | | |
* | | | | | Merge pull request #26004 from y-yagi/remove_unnecessary_require_and_extendSantiago Pastorino2016-08-011-8/+0
|\ \ \ \ \ \ | | | | | | | | | | | | | | remove unnecessary require and extend
| * | | | | | remove unnecessary require and extendyuuji.yaginuma2016-07-311-8/+0
| | |_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `rack/test` is require at the top of file. https://github.com/rails/rails/blob/master/railties/test/railties/engine_test.rb#L3 In addtion, `Rack::Test::Methods` is include in class, extend is unnecessary. https://github.com/rails/rails/blob/master/railties/test/railties/engine_test.rb#L9
* | | | | | Merge pull request #26001 from yui-knk/warningKasper Timm Hansen2016-08-011-0/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Suppress warnings
| * | | | | | Suppress warningsyui-knk2016-07-311-0/+1
| |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit suppressed `warning: instance variable @session_store not initialized`. e5a6f7ee9e951dbe0e4e9ea2c0743b4dfb135c57 introduced these warnings.
* | | | | | Merge pull request #26013 from y-yagi/remove_old_links_about_debuggerKasper Timm Hansen2016-08-011-7/+0
|\ \ \ \ \ \ | |/ / / / / |/| | | | | remove old links from debugging guide [ci skip]
| * | | | | remove old links from debugging guide [ci skip]yuuji.yaginuma2016-08-011-7/+0
|/ / / / /
* | | | | Merge pull request #25992 from rails/revert-25914-jm/not_inDavid Heinemeier Hansson2016-07-294-81/+0
|\ \ \ \ \ | |/ / / / |/| | | | Revert "Adds `not_in?` onto Object"
| * | | | Revert "Adds `not_in?` onto Object"David Heinemeier Hansson2016-07-294-81/+0
|/ / / /
* | | | Merge pull request #25965 from nicksieger/ac_test_case_reset_rack_inputGuillermo Iguaran2016-07-283-0/+23
|\ \ \ \ | | | | | | | | | | Reset rack.input when the environment is scrubbed for the next request
| * | | | Test that ActionDispatch::IntegrationTest does not leak parametersNick Sieger2016-07-281-0/+14
| | | | |
| * | | | Reset rack.input when the environment is scrubbed for the next requestNick Sieger2016-07-272-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Before this change, posted parameters would leak across requests. The included test case failed like so: 1) Failure: TestCaseTest#test_multiple_mixed_method_process_should_scrub_rack_input: --- expected +++ actual @@ -1 +1 @@ -{"bar"=>"an bar", "controller"=>"test_case_test/test", "action"=>"test_params"} +{"foo"=>"an foo", "bar"=>"an bar", "controller"=>"test_case_test/test", "action"=>"test_params"} An argument could be made that this situation isn't encountered often and that one should limit the number of requests per test case, but I still think the parameter leaking is an unexpected side-effect.
* | | | | Merge pull request #25941 from kamipo/finder_methods_uses_load_targetRafael França2016-07-283-5/+7
|\ \ \ \ \ | | | | | | | | | | | | `FinderMethods` uses `records` (`load_target`) when `loaded?` is true
| * | | | | `FinderMethods` uses `records` (`load_target`) when `loaded?` is trueRyuta Kamizono2016-07-283-5/+7
| | | | | |
* | | | | | Merge pull request #25940 from kamipo/fix_collection_proxy_loadRafael França2016-07-282-0/+14
|\ \ \ \ \ \ | | | | | | | | | | | | | | Fix to `CollectionProxy#load` does `load_target`
| * | | | | | Fix to `CollectionProxy#load` does `load_target`Ryuta Kamizono2016-07-252-0/+14
| |/ / / / /
* | | | | | Merge pull request #25937 from kamipo/remove_prepare_binds_for_databaseRafael França2016-07-284-8/+4
|\ \ \ \ \ \ | | | | | | | | | | | | | | Remove `prepare_binds_for_database` internal method
| * | | | | | Remove `prepare_binds_for_database` internal methodRyuta Kamizono2016-07-284-8/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | To avoid relying on the connection adapter for type casting binds.
* | | | | | | Merge pull request #25340 from kamipo/prevent_table_comment_queryRafael França2016-07-283-7/+17
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | Prevent `table_comment` query if a table doesn't have a comment
| * | | | | | | Prevent `table_comment` query if a table doesn't have a commentRyuta Kamizono2016-06-103-7/+17
| | | | | | | |
* | | | | | | | Merge pull request #25974 from ↵Rafael França2016-07-281-2/+4
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | kamipo/avoid_calling_current_database_in_table_comment Avoid calling `current_database` in `table_comment`
| * | | | | | | | Avoid calling `current_database` in `table_comment`Ryuta Kamizono2016-07-281-2/+4
| | |/ / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `current_database` executes a query and `table_comment` is called to all tables even if a table does not have a comment. Using `current_database` increases extra queries.
* | | | | | | | Merge pull request #25973 from ↵Matthew Draper2016-07-283-5/+5
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | kamipo/should_freeze_quoted_column_table_names_cache `@quoted_{column,table}_names` should cache a frozen string
| * | | | | | | `@quoted_{column,table}_names` should cache a frozen stringRyuta Kamizono2016-07-283-5/+5
|/ / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Caching a mutable string causes the following issue. ``` Loading development environment (Rails 5.1.0.alpha) irb(main):001:0> ActiveRecord::Base.connection.quote_table_name('foo') << '!!' => "`foo`!!" irb(main):002:0> ActiveRecord::Base.connection.quote_table_name('foo') << '!!' => "`foo`!!!!" irb(main):003:0> ActiveRecord::Base.connection.quote_table_name('foo') << '!!' => "`foo`!!!!!!" ```
* | | | | | | Merge pull request #25948 from chetna1726/docsRafael França2016-07-281-0/+1
|\ \ \ \ \ \ \ | | | | | | | | | | | | | | | | [ci skip] Add documentation for error using select with order
| * | | | | | | [ci skip] Add documentation for error using select with orderChetna Sharma2016-07-251-0/+1
| | | | | | | |
* | | | | | | | Merge pull request #25961 from Azzurrio/masterRafael França2016-07-284-1/+18
|\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | Fix accessing provider_job_id inside active jobs for sidekiq adapter
| * | | | | | | | Fix accessing provider_job_id inside active jobs for sidekiq adapterAzzurrio2016-07-284-1/+18
| | | | | | | | |
* | | | | | | | | Merge pull request #25952 from harfangk/masterप्रथमेश Sonpatki2016-07-281-19/+14
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Updated getting_started.md guide source text to reflect the change in error message …
| * | | | | | | | | Updated getting_started guide to reflect the change in error message for ↵Bonghyun Kim2016-07-281-19/+14
| | |_|_|_|/ / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActionController::UnknownFromat in ArticlesController#new Restored texts about XML and JS template handlers. [ci skip]
* | | | | | | | | Do not require rb-inotifyRafael Mendonça França2016-07-271-1/+1
| | | | | | | | |
* | | | | | | | | Use a form of rb-inotify to fix broken tests with Ruby 2.2.5Rafael Mendonça França2016-07-272-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | See https://github.com/nex3/rb-inotify/pull/49