aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | Merge pull request #19428 from bdmac/fix_safe_buffer_titleizeRafael Mendonça França2016-05-181-1/+2
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes Inflector#titleize to work with SafeBuffer
| * | | | | | | | | Fixes Inflector#titleize to work with SafeBufferBrian McManus2015-03-203-2/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The way Inflector#titleize was implemented did not work properly when called on a SafeBuffer object. Using the global `$&` variable in the gsub resulted in calling capitalize on a nil object for reasons I still do not fully understand. Removing the UNSAFE_STRING_METHODS override for the gsub method in SafeBuffer "fixed" the bug but is obviously unacceptable. An example of this is very easy to see in rails console: ActiveSupport::SafeBuffer.new("my test").titleize > NoMethodError: undefined method `capitalize' for nil:NilClass Using the non global version of gsub with a |match| arg passed to the block fixes the problem. Again I do not quite understand why. I noticed that other parts of Inflector were already using the standard block arg version of gsub so I don't think it should be a problem to convert this method to using it as well.
* | | | | | | | | | Merge pull request #25067 from ro31337/patch-2Rafael França2016-05-181-0/+1
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Improve method description
| * | | | | | | | | | Improve method descriptionRoman Pushkin2016-05-181-0/+1
|/ / / / / / / / / / | | | | | | | | | | | | | | | | | | | | Method description improved to reflect little bit more complicated scenario when names are camel-cased.
* | | | | | | | | | Merge pull request #25066 from mohitnatoo/rails-validation-happensRafael França2016-05-181-4/+2
|\ \ \ \ \ \ \ \ \ \ | |_|_|_|_|_|_|_|/ / |/| | | | | | | | | Removing redundant 'happens' in callbacks documentation
| * | | | | | | | | - removing redundant 'happens' in documentation [ci skip]Mohit Natoo2016-05-191-4/+2
|/ / / / / / / / /
* | | | | | | | | Merge pull request #25059 from maclover7/jm-capitalize-md5Rafael França2016-05-172-4/+4
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | `md5` --> `MD5`
| * | | | | | | | | `md5` --> `MD5`Jon Moss2016-05-172-4/+4
|/ / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sorry, I missed a few places in my last PR. This should be the last of 'em :grimacing:
* | | | | | | | | Merge pull request #25052 from matkoniecz/2008_is_not_recentJon Moss2016-05-171-3/+1
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | update to make it less obvious that this guide is from 2008/2009
| * | | | | | | | | update to make it less obvious that this guide is from 2008/2009Mateusz Konieczny2016-05-171-3/+1
| | |/ / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | malicious ads are neither new nor unusual live HTTP headers project is dead - see https://www.mozdev.org/bugs/show_bug.cgi?id=25944
* | | | | | | | | keep layouts + locals from bloating the cacheAaron Patterson2016-05-173-3/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using locals will cause layouts to be cached multiple times in the template cache. This commit removes locals from consideration when looking up the layout.
* | | | | | | | | Safari 4 supports http only cookie (#25053)Mateusz Konieczny2016-05-171-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Update documentation about Safari 4 supporting http only cookie - Source: www.greebo.net/2009/06/09/httponly-in-safari-40-release/ via http://stackoverflow.com/questions/528405/which-browsers-do-support-httponly-cookies
* | | | | | | | | locals can be accessed from templates rendered in the controllerAaron Patterson2016-05-171-0/+16
| | | | | | | | |
* | | | | | | | | Merge pull request #25039 from maclover7/jm-capitalization-2Jon Moss2016-05-171-15/+15
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | Fix security guide capitalization errors
| * | | | | | | | Fix security guide capitalization errorsJon Moss2016-05-161-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Would have submitted to docrails, but this guide was just changed today, and docrails doesn't have the most updated version :grimacing: cc @vipulnsward [ci skip]
* | | | | | | | | Add Attributes API to release notes [ci skip]Vipul A M2016-05-171-1/+68
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Add Attributes API to release notes [ci skip]
| * | | | | | | | | Add Attributes API to release notesVipul A M2016-04-141-1/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | | | Merge pull request #25036 from maclover7/jm-capitalizationJon Moss2016-05-161-3/+3
|\ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / |/| | | | | | | | | `md5` --> `MD5`
| * | | | | | | | | `md5` --> `MD5`Jon Moss2016-05-161-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ci skip]
* | | | | | | | | | Update the Rails security guide [ci skip]Vipul A M2016-05-171-2/+2
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / |/| | | | | | | | | Update the Rails security guide [ci skip]
| * | | | | | | | | Update the Rails security guideRalin Chimev2016-05-161-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bring up-to-date the information about the session id in the Sessions section. The guide currently says that the session id is a md5 hash while the implementation uses a random hex string. Fixes #25032. [ci skip]
* | | | | | | | | | Remove extranous spaces from assignment.Kasper Timm Hansen2016-05-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Leftover from an earlier commit, chose to fix because I was just down in this file.
* | | | | | | | | | Replace middleware with executor callback.Kasper Timm Hansen2016-05-162-8/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per request digest caches were added before we had hooks into different units of work that Rails performs. As such the most reliable way to prevent stale cache digests was with a middleware. The middleware prevented staleness in Action Controller requests. However, the executor is superior because it should also prevent staleness when running just Active Job jobs or broadcasting through Action Cable's server.
* | | | | | | | | | Merge pull request #24203 from sferik/count_with_blockKasper Timm Hansen2016-05-165-6/+28
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Forward ActiveRecord::Relation#count to Enumerable#count if block given
| * | | | | | | | | | Forward ActiveRecord::Relation#count to Enumerable#count if block givenErik Michaels-Ober2016-03-195-6/+28
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #24930 from henrik/date-all-daySean Griffin2016-05-163-5/+22
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Introduce Date#all_day
| * | | | | | | | | | | Introduce Date#all_dayHenrik Nyh2016-05-113-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Useful for queries like: Item.where(created_at: Date.current.all_day) There was already a Time#all_day with the same behaviour, but for queries like the above, Date is more convenient.
* | | | | | | | | | | | Merge pull request #25009 from jahfer/suppressor-keep-stateSean Griffin2016-05-162-1/+14
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / |/| | | | | | | | | | | Keep previous state around for nested calls to #suppress
| * | | | | | | | | | | Keep state around for nested calls to #suppressJahfer Husain2016-05-162-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a call to #suppress from the same class occurred inside another #suppress block, the suppression state would be set to false before the outer block completes. This change keeps the previous state around in memory and unwinds it as the blocks exit.
* | | | | | | | | | | | Merge pull request #23810 from xijo/fix_json_coder_when_mysql_strict_is_disabledSean Griffin2016-05-163-1/+20
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix bug in JSON deserialization when column default is an empty string
| * | | | | | | | | | | | Fix bug in JSON deserialization when column default is an empty stringJohannes Opper2016-02-223-1/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When `ActiveRecord::Coders::JSON` serialization is used and the default of the column returns `''` it raises the following error: ``` JSON::ParserError: A JSON text must at least contain two octets! ``` If MySQL is running in non-strict mode, it returns an empty string as column default for a text column: ```ruby def extract_default if blob_or_text_column? @default = null || strict ? nil : '' end end ``` Since `''` is invalid JSON, there shouldn't be an attempt to parse it, it should be treated like nil. ActiveRecord::Coders::JSON should behave consistently for all possible non-user-set column default values.
* | | | | | | | | | | | | Merge pull request #25023 from slbug/patch-1Sean Griffin2016-05-162-0/+9
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rails 5.1 point type should not raise exception if empty string is provided as input
| * | | | | | | | | | | | | Rails 5.1 point type should not raise exception if empty string is provided ↵bUg2016-05-152-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | as value
* | | | | | | | | | | | | | Action Mailer: Declarative exception handling with `rescue_from`.Jeremy Daer2016-05-1513-123/+274
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Follows the same pattern as controllers and jobs. Exceptions raised in delivery jobs (enqueued by `#deliver_later`) are also delegated to the mailer's rescue_from handlers, so you can handle the DeserializationError raised by delivery jobs: ```ruby class MyMailer < ApplicationMailer rescue_from ActiveJob::DeserializationError do … end ``` ActiveSupport::Rescuable polish: * Add the `rescue_with_handler` class method so exceptions may be handled at the class level without requiring an instance. * Rationalize `exception.cause` handling. If no handler matches the exception, fall back to the handler that matches its cause. * Handle exceptions raised elsewhere. Pass `object: …` to execute the `rescue_from` handler (e.g. a method call or a block to instance_exec) against a different object. Defaults to `self`.
* | | | | | | | | | | | | | Merge pull request #25022 from ysksn/masterRafael França2016-05-152-4/+4
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / |/| | | | | | | | | | | | | Add some assertions for BigDecimal#to_s
| * | | | | | | | | | | | | Remove unnecessary constantYosuke Kabuto2016-05-151-4/+2
| | | | | | | | | | | | | |
| * | | | | | | | | | | | | Add some assertions for BigDecimal#to_sYosuke Kabuto2016-05-151-0/+2
|/ / / / / / / / / / / / /
* | | | | | | | | | | | | reorder env keys in the generated config/cable.ymlXavier Noria2016-05-151-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conventionally envs are ordered development -> test -> production.
* | | | | | | | | | | | | Merge pull request #25002 from maclover7/jm-add-actioncable-guideXavier Noria2016-05-141-0/+4
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add Action Cable guide to list
| * | | | | | | | | | | | | Add Action Cable guide to listJon Moss2016-05-131-0/+4
| | |/ / / / / / / / / / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This effectively publishes the "Action Cable Overview" guide. If we don't think this is ready for the prime time, we can mark it as a "work in progress" guide. [ci skip]
* | | | | | | | | | | | | edit pass over the cable guide [ci skip]Xavier Noria2016-05-141-143/+181
| | | | | | | | | | | | |
* | | | | | | | | | | | | Merge pull request #24992 from tomkadwill/test_and_comment_server_port_rebasedEileen M. Uchitelle2016-05-142-0/+22
|\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Document and test ActionDispatch server_port
| * | | | | | | | | | | | | Document and test ActionDispatch server_portTom Kadwill2016-05-122-0/+22
| | | | | | | | | | | | | |
* | | | | | | | | | | | | | Merge branch 'master' of github.com:rails/docrailsVijay Dev2016-05-147-53/+72
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: guides/source/configuring.md
| * | | | | | | | | | | | | | Add output snippet from `ActionController::API.ancestors - ↵Vipul A M2016-05-131-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ActionController::Metal.ancestors` command for api apps. [ci skip]
| * | | | | | | | | | | | | | Remove ambiquity in what we are referring to in the documentation of config ↵Vipul A M2016-05-111-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vs configuring the server itself
| * | | | | | | | | | | | | | Document config.action_dispatch.ignore_accept_header and ↵Vipul A M2016-05-111-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | config.action_dispatch.x_sendfile_header in configuring guide
| * | | | | | | | | | | | | | More missing true literal quotingsVipul A M2016-05-111-12/+12
| | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | Lets be consistent in the usage of true/false across this guide. It should ↵Vipul A M2016-05-111-26/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | be quoted as how other config options are. They are already quoted at many places. This change, makes this usage consistent. Note that, this is quoting literal values true and false, not truthy values
| * | | | | | | | | | | | | | Document missing smtp config over at configuring guide. [ci skip]Vipul A M2016-05-111-0/+3
| | | | | | | | | | | | | | |