aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Trust `Object#dup` in `ActionController::Parameters`, using ↵Tim Rogers2016-07-082-16/+20
| | | | | | `#initialize_copy` to manually duplicate the underlying parameters hash It looks like `ActionController::Parameters#dup` is leftover from when the class inherited from `Hash`. We can just trust `#dup`, which already copies the `@permitted` instance variable (confirmed by tests). We still define a `#initialize_copy` to make `@parameters` a copy that can be mutated without affecting the original instance.
* Changes to a dupped `ActionController::Parameters` mutate the originalTim Rogers2016-07-072-0/+30
| | | | | | | | | | | | | | When `ActionController::Parameters` is duplicated with `#dup`, it doesn't create a duplicate of the instance variables (e.g. `@parameters`) but rather maintains the reference (see <http://ruby-doc.org/core-2.3.1/Object.html>). Given that the parameters object is often manipulated as if it were a hash (e.g. with `#delete` and similar methods), this leads to unexpected behaviour, like the following: ``` params = ActionController::Parameters.new(foo: "bar") duplicated_params = params.dup duplicated_params.delete(:foo) params == duplicated_params ``` This fixes the bug by defining a private `#initialize_copy` method, used internally by `#dup`, which makes a copy of `@parameters`.
* Merge pull request #25717 from alexcameron89/connection_pool_docप्रथमेश Sonpatki2016-07-061-21/+21
|\ | | | | [ci skip] Update ConnectionPool documentation for readability purposes
| * [ci skip] Update ConnectionPool documentation for readabilityAlex Kitchens2016-07-061-21/+21
| |
* | Merge pull request #25716 from willnet/remove-rails-4प्रथमेश Sonpatki2016-07-061-1/+1
|\ \ | |/ |/| [ci skip] Remove reference to Rails 4 in the initialization guide.
| * [ci skip] Remove reference to Rails 4 in the initialization guide.willnet2016-07-061-1/+1
|/ | | | | | Following commit removed reference to rails 4, but there is one left. https://github.com/rails/rails/commit/a9f50f87c38659d0e9425f86f613cf5328d55d27
* Merge pull request #25708 from maclover7/jm-master-bugreportsSantiago Pastorino2016-07-063-3/+3
|\ | | | | Bump version for master bug report templates
| * Bump version for master bug report templatesJon Moss2016-07-053-3/+3
| |
* | Merge pull request #25710 from y-yagi/follow_up_to_24436प्रथमेश Sonpatki2016-07-064-5/+5
|\ \ | |/ |/| remove `-t` option from default sendmail arguments [ci skip]
| * remove `-t` option from default sendmail arguments [ci skip]yuuji.yaginuma2016-07-064-5/+5
|/ | | | Follow up to #24436
* Merge pull request #24890 from vipulnsward/travel-to-raiseKasper Timm Hansen2016-07-054-14/+116
|\ | | | | `travel/travel_to` travel time helpers, now raise on nested calls
| * `travel/travel_to` travel time helpers, now raise on nested calls,Vipul A M2016-07-024-14/+116
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as this can lead to confusing time stubbing. Instead of: travel_to 2.days.from_now do # 2 days from today travel_to 3.days.from_now do # 5 days from today end end preferred way to achieve above is: travel_to 2.days.from_now # 2 days from today travel_back travel_to 5.days.from_now # 5 days from today Closes #24690 Fixes #24689
* | Merge pull request #25704 from ↵Rafael França2016-07-052-0/+11
|\ \ | | | | | | | | | | | | fledman/add_respond_to_missing_to_rails_application_configuration_custom implement respond_to_missing? to match method_missing
| * | implement respond_to_missing? to match method_missingDavid Feldman2016-07-052-0/+11
| | |
* | | Merge pull request #25668 from kamipo/use_squish_rather_than_strip_heredocRafael França2016-07-052-4/+4
|\ \ \ | | | | | | | | Use `squish` rather than `strip_heredoc`
| * | | Use `squish` rather than `strip_heredoc`Ryuta Kamizono2016-07-042-4/+4
| | | |
* | | | Merge pull request #25692 from ↵Rafael França2016-07-052-0/+18
|\ \ \ \ | |_|/ / |/| | | | | | | | | | | johnmeehan/allow-registering-directory-for-rake-notes Allow rake notes to work with other directories.
| * | | Fix test to try `spec/` directory as opposed to `app/spec` which I hadJohn Meehan2016-07-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | accidently set it to. Made the change and test still passes.
| * | | removed extra blank lineJohn Meehan2016-07-051-1/+0
| | | |
| * | | Allow rake notes to work with other directories.John Meehan2016-07-052-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Additional directories can be added using SourceAnnotationExtractor::Annotation.register_directories("spec", "other_dir") Result: rake notes will now extract notes from these directories.
* | | | Merge pull request #25693 from volmer/masterRafael França2016-07-052-0/+13
|\ \ \ \ | | | | | | | | | | Deprecate usage of nil as route path
| * | | | Deprecate usage of nil as route pathVolmer2016-07-052-0/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In Rails 4 these kind of routes used to work: ```ruby scope '/*id', controller: :builds, as: :build do get action: :show end ``` But since 1a830cbd830c7f80936dff7e3c8b26f60dcc371d, routes are only created for paths specified as strings or symbols. Implicit `nil` paths are just ignored, with no deprecation warnings or errors. Routes are simply not created. This come as a surprise for people migrating to Rails 5, since the lack of logs or errors makes hard to understand where the problem is. This commit introduces a deprecation warning in case of path as `nil`, while still allowing the route definition.
* | | | | Merge pull request #25257 from ta1kt0me/inspect_initializersRichard Schneeman2016-07-053-1/+10
|\ \ \ \ \ | | | | | | | | | | | | Display railtie class name in `rails initializers`
| * | | | | Initializer provides its context class nameta1kt0me2016-06-123-3/+10
| | | | | |
| * | | | | Delegate public method for raitile nameta1kt0me2016-06-112-1/+3
| | | | | |
| * | | | | Display railtie class name in `rails initializers`ta1kt0me2016-06-021-1/+1
| | | | | |
* | | | | | Merge pull request #25698 from CodingItWrong/action-cable-title-fixJon Moss2016-07-051-1/+3
|\ \ \ \ \ \ | | | | | | | | | | | | | | Add header demarcation to Action Cable guide
| * | | | | | Add header demarcation to Action Cable guideJosh Justice2016-07-051-1/+3
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Guide generation is configured to detect a guide header by a 40-or-more-hyphen long line. The Action Cable guide was missing this line, so the page title on the guides site was only showing "Ruby on Rails Guides", and the section title in the Kindle index was "Ruby on Rails Guides". Adding the header demarcation line back in fixes both of these. Fixes #25697 [ci skip]
* | | | | | Merge pull request #25696 from bquorning/link-to-the-right-documentationप्रथमेश Sonpatki2016-07-051-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | Point to the correct documentation
| * | | | | | Point to the correct documentation [ci skip]Benjamin Quorning2016-07-051-1/+1
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The options used in this file are *not* directly described in the Rails 5.0 release notes (http://edgeguides.rubyonrails.org/5_0_release_notes.html), but instead in section 2 of the Guide for Upgrading Ruby on Rails document (http://edgeguides.rubyonrails.org/upgrading_ruby_on_rails.html).
* | | | | | Merge pull request #25687 from Paperback/masterRichard Schneeman2016-07-041-4/+0
|\ \ \ \ \ \ | |_|_|/ / / |/| | | | | Robots.txt removed disallow all instructions
| * | | | | Robots.txt removed disallow all instructionsSam Sweeney2016-07-051-4/+0
| | |/ / / | |/| | |
* | | | | Merge pull request #25678 from voxik/DRY-downloaderRafael França2016-07-044-65/+36
|\ \ \ \ \ | | | | | | | | | | | | Dry downloader
| * | | | | Skip the test if test data download fails.Vít Ondruch2016-07-044-12/+16
| | | | | |
| * | | | | DRY Downloader.Vít Ondruch2016-07-044-53/+20
| | | | | |
* | | | | | Merge pull request #25679 from voxik/file-fixtures-test-require-pathnameSantiago Pastorino2016-07-041-0/+2
|\ \ \ \ \ \ | |_|/ / / / |/| | | | | Pathname might not be always initialized.
| * | | | | Pathname might not be always initialized.Vít Ondruch2016-07-041-0/+2
| |/ / / / | | | | | | | | | | | | | | | Require 'pathname' explicitly
* | | | | Merge pull request #25680 from ↵Rafael França2016-07-041-7/+5
|\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | HermanHiddema/fix/unnecessary-nesting-in-handle-dependency Fixed unnecessary nesting in handle_dependency
| * | | | | Fixed unnecessary nesting in handle_dependencyHerman Hiddema2016-07-041-7/+5
| |/ / / / | | | | | | | | | | | | | | | | | | | | This nested if checked the same value as the containing case statement. Moved the code in the if/else into when/else in the containing case.
* | | | | Tiny documentation fixes [ci skip]Robin Dupret2016-07-041-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix a link to use RDoc syntax and make sure that the titles' level match the section we are in since we are both documenting the new and the legacy syntax.
* | | | | Merge pull request #25684 from kivanio/masterप्रथमेश Sonpatki2016-07-041-7/+7
|\ \ \ \ \ | |/ / / / |/| | | | fix respond_to? documentation [ci skip]
| * | | | fix respond_to? documentationKivanio Barbosa2016-07-041-7/+7
|/ / / /
* | | | Merge pull request #25663 from vipulnsward/updated-syntax-highlighterXavier Noria2016-07-0445-5235/+24
|\ \ \ \ | | | | | | | | | | Update Syntax Highlighter to version 4 [ci skip]
| * | | | - Update Syntax Highlighter to version 4.Vipul A M2016-07-0345-5235/+24
| | |_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Build Syntax Highlighter based on https://github.com/syntaxhighlighter/syntaxhighlighter/wiki/Building and use theme generated by fxn. - This also bundles these brushes in the file itself- ruby,css,xml,sql,javascript,plain. Generation command used: gulp build --compat --brushes=javascript,ruby,xml,sql,plain --theme=/Path/To/RailsSource/rails/guides/assets/stylesheets/syntaxhighlighter/shThemeRailsGuides.css - rm all old js and css files - Moved over how JS configuration is created for Syntax Highlighter - Fixed layout for all imports - Fixes bug with old copy paste, generating wrong space character on webkit https://github.com/syntaxhighlighter/syntaxhighlighter/blob/7caa9632e7fe470d944fc06b4db7d35352ebaa36/src/dom.js#L227 Fixes #25655
* | | | Merge pull request #24988 from mwear/action_cable_broadcast_notificationsMatthew Draper2016-07-043-6/+58
|\ \ \ \ | | | | | | | | | | Add ActiveSupport::Notifications hook to ActionCable::Server.broadcast
| * | | | Add ActiveSupport::Notifications hook to Broadcaster#broadcastMatthew Wear2016-05-123-6/+58
| | | | | | | | | | | | | | | | | | | | | | | | | This addition of this notification hook will give users better visibility into the messages being sent over the PubSub adapter.
* | | | | Merge pull request #25030 from mmmpa/pull_requestMatthew Draper2016-07-042-1/+22
|\ \ \ \ \ | |_|_|_|/ |/| | | | ActionCable, sometimes add_channel is not called.
| * | | | Add guard to broadcast.mmmpa2016-05-262-1/+22
| | | | |
* | | | | Merge pull request #25241 from aguynamedben/fix-touch-error-messagesRichard Schneeman2016-07-032-2/+12
|\ \ \ \ \ | | | | | | | | | | | | Improve error message when record touch fails.
| * | | | | Improve error message when record touch fails.Ben Standefer2016-07-022-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current error message only indicates that a touch can fail because the record is new. In practice, we saw cases where touches were failing because the record had been destroyed. `persisted?` checks `new_record?` *and* `destroyed?`. It was confusing to get a message about a new record when in reality we were destroying records. I also included a helpful tip for users to consider using `persisted?`, `new_record?`, or `destroyed?` before touching.