* master: (1455 commits) change 'assert !' to 'assert_not' in guides [ci skip] Pointing to latest guides [ci skip] Methods silence_stream/quietly are not thread-safe [skip ci] [ci skip] Close the meta tag with '/>' instead of '>' Fix render plain docs example in AM::Base Update Docs in favor to use render plain instead of text option ref #14062 Typo fix for unscope Use the reference for the mime type to get the format Preparing for 4.1.0.beta2 release Correctly escape PostgreSQL arrays. Escape format, negative_format and units options of number helpers Sync 4.1 release notes with changes since 7f648bc [ci skip] Update upgrading guide regarding `render :text` Add `#no_content_type` attribute to `AD::Response` Add missing CHANGELOG entry to Action View Update guides for new rendering options Cleanup `ActionController::Rendering` Fix a fragile test on `action_view/render` Introduce `render :html` for render HTML string Introduce `render :plain` for render plain text ... Conflicts: actionmailer/lib/action_mailer/railtie.rb railties/lib/rails/application.rb railties/lib/rails/generators/rails/app/templates/config/environments/production.rb.tt railties/lib/rails/generators/rails/app/templates/config/environments/test.rb.tt
Cookies serializer improvements
MessageEncryptor has :serializer option, where any serializer object can be passed. This commit make it possible to set this serializer from configuration level. There are predefined serializers (:marshal_serializer, :json_serialzier) and custom serializer can be passed as String, Symbol (camelized and constantized in ActionDispatch::Session namepspace) or serializer object. Default :json_serializer was also added to generators to provide secure defalt.
Previously the error was: ``` RuntimeError: You must set secret_key_base in your app's config ``` Will now be: ``` RuntimeError: Missing `secret_key_base` for 'production' environment, set this value in `config/secrets.yml` ```
It is an application global verifier that can be used to generate and verify signed messages. See the documentation of ActiveSupport::MessageVerifier for more information.
* master: (540 commits) Removed excluding vendor from API doc [ci skip] Excluding action_view/vendor in API [ci skip] Refactor handling of action normalization Be sure to restore the default I18n.locale after changed its value in a test Fix order dependent tests Don't mutate the Base settings by merge!ing the given value Reset ActionView::Base.logger instead of AC::Base.logger Fix order dependent tests Fix order dependent AP test grab executable from rubygems used flat_map instead of map.flatten [ci skip] change function def self.table_name to self.table_name Typo fix More unused associations in AR test models Clean up unused associations in AR test model Use Ruby 2.0 caller_locations instead of caller if available Privatize non-test method Allow overriding of all headers from passed environment hash Cleanup task for informing about hstore ... Conflicts: guides/source/4_0_release_notes.md railties/lib/rails/application.rb
This change provides the ability to create a new application with a configuration which can be specified.
The comment on the +env_config+ method is repetitive, likely to get outdated, and provides no useful information which cannot be gleamed from the code. I'm therefore removing it. I'm also refactoring the check for the presence of a secret_token in the configuration.
* master: we only support 1.9+, so just check for a name be consistent about parameter types passed to new_constants_in load the file rather than evaling Removing a repetitive comment and refactoring the Application class in Railties. Creating a class to build the default middleware stack. Calls to the application constant have been refactored to use Rails.application when drawing routes and creating other configurations on the application.
…_class Creating a class to build the default middleware stack.
* master: (508 commits) just construct real objects rather than mock and stub Use Colspan in th Tags Added test for link_to_unless to make sure the result consistency. Escape the string even when the condition of link_to_unless is not satisfied. Add CHANGELOG entry for #10969 Use a case insensitive URI Regexp for #asset_path collection tags accept html attributes as the last element of collection Rewind StringIO instances before be parsed again Use xml instead already parsed xml Updated the doc for const_regexp [ci skip] Make test name descriptive and add reference to original regression commit fixture setup does not rely on `AR::Base.configurations`. regression test + mysql2 adapter raises correct error if conn is closed. cleanup, remove trailing whitespace from AR changelog 'json' gem is no more required under JRuby fix typos Fix AS changelog [ci skip] Update the HTML boolean attributes per the HTML 5.1 spec Changing const_regexp to check for constant name. valid_app_const? -> valid_const? ... Conflicts: actionmailer/lib/action_mailer/base.rb railties/lib/rails.rb
Railties. The comment on the +env_config+ method is repetitive, likely to get outdated, and provides no useful information which cannot be gleamed from the code. I'm therefore removing it. I'm also refactoring the check for the presence of a secret_token in the configuration.
A lot of logic for building the default middleware stack is currently kept in Application class, but this can be encapsulated and made more modular by being moved to its own class. Also refactored a couple of the helper methods.
* master: (151 commits) Squashed commit of the following: Fix generating route from engine to other engine Do not overwrite manually built records during one-to-one nested attribute assignment Revert "Merge pull request #10433 from wangjohn/making_callbacks_more_performant" Work around change in how MiniTest detects SIGINFO Fix broken mysql test Improving the performance of callbacks by keeping a hash of the callbacks in the CallbackChain, so you don't have to iterate over all callbacks when checking for duplicates. Add parameter :sslcompression to PostgreSQL adapter. Add styling to h1 Refactoring the creation of TestTasks to remove code duplication. rake:db:test:prepare falls back to original environment after execution. Add test for `AR::Base#to_param` destroys association records before saving/inserting new association records Fixes Dependency bug in Active Support Fix typo in test Use faster Array.new instead of *padding Remove not used module from initializable test Fix failures in AS with minitest 4.7.4 Extract tests code out from AR's base_test.rb to integration_test.rb Convert ActiveModel to 1.9 hash syntax. ... Conflicts: actionmailer/CHANGELOG.md railties/CHANGELOG.md
A regression was introduced in 5b3bb6, generating route from within an engine to an another engine resulted in prefixing a path with the SCRIPT_NAME value. The regression was caused by the fact that SCRIPT_NAME should be appended only if it's the SCRIPT_NAME for the application, not if it's SCRIPT_NAME from the current engine. closes #10409
* master: (817 commits) extract arrays to constants in Mapper remove redundant variable Return a 405 response for unknown HTTP methods Created a registry based on the +PerThreadRegistry+ module for subscriber queues. Helps limit the number of thread locals. extract no content response codes to a constant also assign nil in dirty nullable_datetime test. #10237 Move CHANGELOG entry to top extract array to a constant Update counter cache when pushing into association extract path into variable fix README links in the main README.md fix wrong test description and failure message Added tests for if condition in Active Model callbacks Removing tests for deprecated options in active support. The +use_full_path+ option was removed in 3b3790a and passing the template handler to render was deprecated in 43d27e9. fix typos Increase readability of ternary statement in build method if singletons belong to the contract, test them Rewrites a CHANGELOG entry. Typo Fix in AR CHANGELOG [ci skip] fix respond_to? for non selected column ... Conflicts: railties/CHANGELOG.md railties/lib/rails/application.rb