aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #23059 from ↵Sean Griffin2016-01-142-58/+19
|\ | | | | | | | | rails/revert-23017-schneems/migration-sets-environment-value Revert "Set environment even when no migration runs"
| * Revert "Set environment even when no migration runs"Sean Griffin2016-01-142-58/+19
|/
* Revert "Merge pull request #20835 from ↵Kasper Timm Hansen2016-01-145-45/+2
| | | | | | | | | | | | | glittershark/if-and-unless-in-secure-token" This reverts commit 224eddfc0eeff6555ae88691306e61c7a9e8b758, reversing changes made to 9d681fc74c6251d5f2b93fa9576c9b2113116680. When merging the pull request, I misunderstood `has_secure_token` as declaring a model has a token from birth and through the rest of its lifetime. Therefore, supporting conditional creation doesn't make sense. You should never mark a model as having a secure token if there's a time when it shouldn't have it on creation.
* Merge pull request #23048 from kamipo/substitute_at_is_no_longer_usedSean Griffin2016-01-146-20/+3
|\ | | | | `substitute_at` is no longer used
| * `substitute_at` is no longer usedRyuta Kamizono2016-01-146-20/+3
| | | | | | | | Arel handles substitution for bind parameters by now.
* | Properly include the `from` clause when merging relationsSean Griffin2016-01-142-0/+10
| | | | | | | | | | | | | | | | | | | | The code that set the from clause was removed in bdc5141652770fd227455681cde1f9899f55b0b9. I did not give any reason for doing so. My assumption was that I intended to change it to use the clause objects, but forgot. We appeared to not have test coverage for this case. Fixes #22996
* | Ensure enum scopes work properly with STI and inheritanceSean Griffin2016-01-141-1/+1
| | | | | | | | | | | | | | | | | | The code was changed to call `where` on a specific class in 813c8c07, but no reasoning was given and I can't see any good reason why we would need to do that. This will ensure that the method is called on whatever class the scope is called on. Fixes #23013
* | Merge pull request #23017 from ↵Richard Schneeman2016-01-142-19/+58
|\ \ | | | | | | | | | | | | schneems/schneems/migration-sets-environment-value Set environment even when no migration runs
| * | Set environment even when no migration runsschneems2016-01-112-1/+37
| | | | | | | | | | | | | | | This PR addresses the issue described in https://github.com/rails/rails/pull/22967#issuecomment-170251635. If the database is non empty and has no new migrations than `db:migrate` will not set the environment. This PR works by always setting the environment value on successful `up` migration regardless of whether or not a migration was actually executed.
| * | Clean up duplicate migration logicschneems2016-01-112-18/+21
| | |
* | | Merge pull request #23054 from ankit1910/update-docJon Moss2016-01-141-0/+1
|\ \ \ | | | | | | | | update doc for << method of has_many association
| * | | update doc for << method of has_many associationankit19102016-01-141-0/+1
| | | |
* | | | Merge pull request #23056 from ankit1910/fix-typoRafael França2016-01-141-1/+1
|\ \ \ \ | |/ / / |/| | | [ci skip] fix typo in docs
| * | | [ci skip] fix typo in docsankit19102016-01-141-1/+1
|/ / /
* | | Merge pull request #23049 from sevenseacat/patch-1Jon Moss2016-01-131-2/+2
|\ \ \ | | | | | | | | Fix typo in docs [ci skip]
| * | | Fix typo in docs [ci skip]Rebecca Skinner2016-01-141-2/+2
|/ / /
* | / Space OddityAkira Matsuda2016-01-143-4/+4
| |/ |/| | | | | | | Converting nbsp(\u{00A0}) to the normal ASCII space(\u{0020}) [ci skip]
* | docs, formatting pass over changelogs. [ci skip]Yves Senn2016-01-134-11/+13
| |
* | fix regression when loading fixture files with symbol keys.Yves Senn2016-01-134-2/+16
| | | | | | | | Closes #22584.
* | Merge pull request #23040 from rafaelfranca/or-error-messageMatthew Draper2016-01-132-7/+11
|\ \ | | | | | | Improve error message for #or when it is structurally incompatible
| * | Improve error message for #or when it is structurally incompatibleRafael Mendonça França2016-01-132-7/+11
|/ / | | | | | | | | | | | | | | When you are using scopes and you chaining these scopes it is hard to know which are the values that are incompatible. This way you can read the message and know for which values you need to look for. [Herminio Torres]
* | do not run in parallel on travisAaron Patterson2016-01-121-1/+5
| |
* | Revert "Change `WhereClause#merge` to same named columns on diff tables"Sean Griffin2016-01-122-25/+13
| | | | | | | | | | | | | | | | | | This reverts commit 5d41cb3bfd6b19833261622ce5d339b1e580bd8b. This implementation does not properly handle cases involving predicates which are not associated with a bind param. I have the fix in mind, but don't have time to implement just yet. It will be more similar to #22823 than not.
* | remove `present?` callsAaron Patterson2016-01-121-4/+4
| | | | | | | | | | Empty strings / data structures should be treated differently than nils. We don't really need these calls here (don't pass in blank strings).
* | monkey patch `recycle!` on to controllers onceAaron Patterson2016-01-121-4/+4
| | | | | | | | | | | | | | | | | | | | | | Instead of checking whether the class has recycle! or not, we can just always add the method to all controller classes when the test harness is loaded. Technically this means that the controller test harness will not work with controllers that do not inherit from AC::Metal, but then, I'm not sure that is supported anyway. Mixing in the module one will ensure that we don't break method caches, and eliminates a runtime check so it should speed up tests (slightly).
* | Merge pull request #22935 from cllns/add-status-name-to-outputRafael França2016-01-125-17/+84
|\ \ | | | | | | Add HTTP status name to output of tests
| * | Add both HTTP Response Code and Type to assertion messagesSean Collins2016-01-125-17/+84
| | | | | | | | | | | | | | | Also, refactor logic to convert between symbol and response code, via the AssertionResponse class
* | | Merge pull request #23035 from jkowens/fix-null-byteRafael França2016-01-122-1/+9
|\ \ \ | | | | | | | | Prevent static middleware from attempting to serve a request with a null byte
| * | | Prevent attempt to serve a request with a null byteJordan Owens2016-01-122-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | File paths cannot contain null byte characters and methods that do path operations such as Rack::Utils#clean_path_info will raise unwanted errors.
* | | | Change `WhereClause#merge` to same named columns on diff tablesSean Griffin2016-01-122-13/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While the predicates are an arel equality node where the left side is a full arel attribute, the binds just have the name of the column and nothing else. This means that while splitting the predicates can include the table as a factor, the binds cannot. It's entirely possible that we might be able to have the bind params carry a bit more information (I don't believe the name is used for anything but logging), and that is probably a worthwhile change to make in the future. However the simplest (and likely slightly faster) solution is to simply use the indices of the conflicts in both cases. This means that we only have to compute the collision space once, instead of twice even though we're doing an additional array iteration. Regardless, this method isn't a performance hotspot. Close #22823. [Ben Woosley & Sean Griffin]
* | | | Merge pull request #23034 from claudiob/fix-ac-param-as-jsonRafael França2016-01-122-1/+8
|\ \ \ \ | |_|/ / |/| | | AC::Parameters#at_json: restore Rails 4.2’s value
| * | | AC::Parameters#at_json: restore Rails 4.2’s valueclaudiob2016-01-122-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | Fixes #23026 See discussion at #23026
* | | | bring back `TEST` env for `rake test`.Yves Senn2016-01-123-1/+21
|/ / / | | | | | | | | | | | | | | | | | | Closes #23027. This does not restore complete backwards compatibility. It simply passes the contets of the `TEST` env to the new runner.
* | | add migration versioning example to the changelog. [ci skip]Yves Senn2016-01-121-0/+8
| | | | | | | | | | | | Closes #23021.
* | | Merge pull request #23004 from matthewd/default-scope-stiMatthew Draper2016-01-127-19/+61
|\ \ \ | | | | | | | | Make default scopes + STI happy again
| * | | Skip the STI condition when evaluating a default scopeMatthew Draper2016-01-124-3/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Given a default_scope on a parent of the current class, where that parent is not the base class, the parent's STI condition would become attached to the evaluated default scope, and then override the child's own STI condition. Instead, we can treat the STI condition as though it is a default scope, and skip it in this situation: the scope will be merged into the base relation, which already contains the correct STI condition. Fixes #22426.
| * | | Active scopes apply to child classes, though not parents/siblingsMatthew Draper2016-01-123-16/+37
| | |/ | |/| | | | | | | | | | | | | | | | While the commit message (and changelog example) in 5e0b555b453ea2ca36986c111512627d806101e7 talked about sibling classes, the added test had a child ignore its parent's scoping, which seems less reasonable.
* | | Merge pull request #23020 from matthewd/frozen-headersMatthew Draper2016-01-123-1/+29
|\ \ \ | | | | | | | | Commit before freezing the headers
| * | | Commit before freezing the headersMatthew Draper2016-01-123-1/+29
|/ / / | | | | | | | | | | | | This shouldn't generally come up: under a standard flow, we don't start sending until after the commit. But application code always finds a way.
* | | Merge pull request #20762 from maurogeorge/record-not-found-docJon Moss2016-01-111-2/+6
|\ \ \ | | | | | | | | Add a note on ActionController guide about 404
| * | | Add a note on ActionController guide about 404Mauro George2016-01-111-2/+6
| | | | | | | | | | | | | | | | [ci skip]
* | | | Unneeded &block parametersAkira Matsuda2016-01-121-2/+2
|/ / /
* | | Merge pull request #23015 from schneems/schneems/manual-environment-setRichard Schneeman2016-01-112-6/+17
|\ \ \ | |/ / |/| | Allow manually setting environment value
| * | Allow manually setting environment valueschneems2016-01-112-6/+17
|/ / | | | | | | | | | | | | | | If for some reason some one is not able to set the environment from a migration this gives us an escape valve to manually set the environment for the database see https://github.com/rails/rails/pull/22967#issuecomment-170251635. We will also fix the migration case, but this will ensure there is always a way to set the environment. cc/ @sgrif
* | Merge pull request #23003 from y-yagi/remove_warningsKasper Timm Hansen2016-01-111-2/+2
|\ \ | | | | | | remove warnings from rake test
| * | remove warnings from rake testyuuji.yaginuma2016-01-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | This removes the following warnings. ``` test/application/rake_test.rb:33: warning: ambiguous first argument; put parentheses or a space even after `/' operator test/application/rake_test.rb:43: warning: ambiguous first argument; put parentheses or a space even after `/' operator ```
* | | Merge pull request #22808 from y-yagi/do_not_clear_all_reportersKasper Timm Hansen2016-01-111-1/+2
|\ \ \ | |/ / |/| | delete only unnecessary reporter
| * | delete only unnecessary reporteryuuji.yaginuma2016-01-111-1/+2
| | | | | | | | | | | | | | | Reporter that defines its own users at the time of this process are also loaded, to avoid them from being deleted, to delete only the specified to unnecessary reporter.
* | | Merge pull request #22998 from kamipo/extract_mysql_column_classSean Griffin2016-01-104-85/+97
|\ \ \ | | | | | | | | Extract `MySQL::{Column|TypeMetadata}` classes to the appropriate files
| * | | Extract `MySQL::TypeMetadata` class to ↵Ryuta Kamizono2016-01-113-29/+35
| | | | | | | | | | | | | | | | `connection_adapters/mysql/type_metadata.rb`