aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | | | | | 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`
| * | | | | | | | Extract `MySQL::Column` class to `connection_adapters/mysql/column.rb`Ryuta Kamizono2016-01-113-56/+62
| | | | | | | | |
* | | | | | | | | Merge pull request #20638 from jaimeiniesta/locale-aware-pluralize-helperKasper Timm Hansen2016-01-102-17/+36
|\ \ \ \ \ \ \ \ \ | |/ / / / / / / / |/| | | | | | | | Pass the current locale to Inflector from the pluralize text helper.
| * | | | | | | | Pass the current locale to Inflector from the pluralize text helper.Jaime Iniesta2016-01-102-17/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pluralize text helper uses the Inflector to determine the plural form. The inflector accepts an optional parameter for the locale, so we can pass it from the text helper to have locale-aware pluralizations on the text helpers level. The pluralize text helper now only accepts 2 positional arguments: `count` and `singular`. Passing `plural` as a positional argument is now deprecated.
* | | | | | | | | Merge pull request #22833 from sivagollapalli/test_runner_with_multiple_linesKasper Timm Hansen2016-01-103-4/+87
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | Running tests with multiple line numbers
| * | | | | | | | | Added multiple line filters support for test runnerSiva Gollapalli2016-01-103-4/+87
| | | | | | | | | |
* | | | | | | | | | Merge pull request #21181 from denisenkom/mypatchKasper Timm Hansen2016-01-101-0/+19
|\ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | Test basic auth with symbols in password
| * | | | | | | | | | Test basic auth with symbols in login and passwordMikhail Denisenko2015-10-241-0/+19
| | | | | | | | | | |
* | | | | | | | | | | Merge pull request #22983 from bronson/update-mysql-in-guidesSantiago Pastorino2016-01-102-2/+1
|\ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | remove mentions of legacy mysql adapter from guides
| * | | | | | | | | | | remove legacy mysql from guides to match #22715Scott Bronson2016-01-092-2/+1
| | | | | | | | | | | |
* | | | | | | | | | | | Merge pull request #21995 from tak1n/masterJon Moss2016-01-101-8/+35
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|_|/ / / / / / / / / |/| | | | | | | | | | | Add Example for using config_for
| * | | | | | | | | | | fix doc for rails custom configuration through config_for [skip ci]Benny Klotz2015-12-031-2/+2
| | | | | | | | | | | |
| * | | | | | | | | | | Updated existing custom configuration for rails 5 where `config.x`Benny Klotz2015-10-191-8/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | namespace is not needed anymore. Added custom configuration through config_for which parses a yml file in config folder.
* | | | | | | | | | | | Merge pull request #22993 from akshay-vishnoi/travis-updateMatthew Draper2016-01-101-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | Update postgresql version to 9.4 for travis.
| * | | | | | | | | | | | Update postgresql version to 9.4 for travis.Akshay Vishnoi2016-01-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now available - https://docs.travis-ci.com/user/using-postgresql/
* | | | | | | | | | | | | Merge pull request #22992 from akshay-vishnoi/fix-docsSean Griffin2016-01-092-2/+2
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / |/| | | | | | | | | | | | [ci skip] fix typo
| * | | | | | | | | | | | [ci skip] fix typoAkshay Vishnoi2016-01-102-2/+2
| | | | | | | | | | | | |
* | | | | | | | | | | | | Split out token `if` tests to trigger `before_create`.Kasper Timm Hansen2016-01-091-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When running passing condition assertions in the same test the user had already been saved at that point. Split out so we have a not yet persisted user. Rename condition tests to improve clarity a bit.
* | | | | | | | | | | | | Revert "Switch `has_secure_token` to `before_save`."Kasper Timm Hansen2016-01-091-4/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mistakenly interpreted the test case as a sign that we should switch to before_save, when the original pitch use case was intended as before_create. Revert a3ab6ad00872d24d4d87637f93fdae798d0edc79.
* | | | | | | | | | | | | Switch `has_secure_token` to `before_save`.Kasper Timm Hansen2016-01-091-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding `if` and `unless` support doesn't bode well if the callback to assign a token only runs on create. Switch to `before_save`, but keep the conditional so that no token already assigned is overriden.
* | | | | | | | | | | | | Add conditional_token to users.Kasper Timm Hansen2016-01-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix the NoMethodErrors introduced in 224eddf, when adding conditional token creation. The model declarations but the column wasn't added to the schema.
* | | | | | | | | | | | | Merge pull request #20835 from glittershark/if-and-unless-in-secure-tokenKasper Timm Hansen2016-01-094-2/+40
|\ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / |/| | | | | | | | | | | | Support :if and :unless in has_secure_token
| * | | | | | | | | | | | Support :if and :unless in has_secure_tokenGriffin Smith2016-01-094-2/+40
|/ / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pass through :if and :unless options from has_secure_token to the generated before_create callback
* | | | | | | | | | | | Merge pull request #22703 from joshsoftware/rake-log-clearKasper Timm Hansen2016-01-094-10/+33
|\ \ \ \ \ \ \ \ \ \ \ \ | |_|/ / / / / / / / / / |/| | | | | | | | | | | rake log:clear task updated
| * | | | | | | | | | | rake log:clear task updated refs[#22544]Pramod2016-01-094-10/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Avoided truncating all files if no ENV['LOGS'] specified - Updated task to accept LOGS=all for truncating all files from log/ i.e. log/*log - If no LOGS specified will truncates standard environment log files i.e. 'development,test,production' - CHANGELOG & guide update added - bin/setup test cases fixed
* | | | | | | | | | | | [ci skip] Clarify some Minitest origins.Kasper Timm Hansen2016-01-091-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It might be tough for readers to know why we implement `===`, and where the Regexp in `derive_regexp` came from.
* | | | | | | | | | | | Extract line filtering to Railties.Kasper Timm Hansen2016-01-094-64/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The line filter parsing added to ActiveSupport::TestCase is only half the story to enable line filtering. The other half, of adding the patterns to the options, is done in the Minitest plugin that Railties has. Thus it makes more sense to have the filter in Railties with the other half and all the line filtering tests. Move the filter and extend Active Support in an initializer, so that when users or `rails/all.rb` require `rails/test_unit/railtie` we can still filter by line.
* | | | | | | | | | | | Merge pull request #22988 from ↵Richard Schneeman2016-01-091-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | y-yagi/match_environment_variable_name_and_error_message match the environment variable name that actually checking and error message
| * | | | | | | | | | | match the environment variable name that actually checking and error messageyuuji.yaginuma2016-01-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The error message has become a `DISABLE_DATABASE_ENVIRONMENT_CHECK`, modified to match the error message. ref: https://github.com/rails/rails/blob/master/activerecord/lib/active_record/migration.rb#L161
* | | | | | | | | | | | Merge pull request #22986 from yui-knk/fix_automatic_inverse_of_commentप्रथमेश Sonpatki2016-01-091-1/+1
|\ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / |/| | | | | | | | | | | [ci skip] `automatic_inverse_of` returns `false` not `nil` (document …