aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Include user defined attributes in inspectSean Griffin2016-08-312-1/+7
| | | | The fact that this only includes column names is an oversight.
* Remove deprecated handling of PG PointsSean Griffin2016-08-316-56/+32
| | | | | | | | | | There are some minor changes to the point type as I had forgotten that this will affect the behavior of `t.point` in migrations and the schema dumper so we need to handle those as well. I'll say this again so I can convince myself to come up with a better structure... TYPES SHOULD NOT CARE ABOUT SCHEMA DUMPING AND WE NEED TO BETTER SEPARATE THESE.
* Merge pull request #26332 from y-yagi/use_specified_message_in_assert_changesSean Griffin2016-08-312-1/+10
|\ | | | | use `message` that specified in argument to error message
| * use `message` that specified in argument to error messageyuuji.yaginuma2016-08-312-1/+10
| |
* | Revert "Extract `PredicateBuilder::CaseSensitiveHandler`"Sean Griffin2016-08-316-51/+51
| | | | | | | | | | | | | | | | | | This reverts commit 3a1f6fe7b4a70bf0698b0684dd48ac712c6883b6. This commit takes the code in a direction that I am looking to avoid. The predicate builder should be purely concerned with AST construction as it matters to methods like `where`. Things like case sensitivity should continue to be handled elsewhere.
* | Attempt to maintain encoding for arrays of strings with PGSean Griffin2016-08-313-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | I still think that this is something that should be handled in the pg gem, but it's not going to end up happening there so we'll do it here instead. Once we bump to pg 0.19 we can pass the encoding to the `encode` method instead. This issue occurs because C has no concept of encoding (or strings, really). The bytes that we pass here when sending the value to the database will always be interpreted as whatever encoding the connection is currently configured to use. That means that roundtripping to the database will lose no information However, after assigning we round trip through our type system without hitting the database. The only way that we can do the "correct" thin here would be to actually give a reference to the connection to the array type and have it check the current value of the connection's encoding -- which I'm strongly opposed to. We could also pass in the encoding when it's constructed, but since that can change independently of the type I'm not a huge fan of that either. This feels like a reasonable middle ground, where if we have an array of strings we simply use the encoding of the string we're given. Fixes #26326.
* | Override `respond_to_missing?` instead of `respond_to?` when possibleSean Griffin2016-08-315-5/+5
| | | | | | | | | | | | | | | | | | | | This was almost every case where we are overriding `respond_to?` in a way that mirrors a parallel implementation of `method_missing`. There is one remaining case in Active Model that should probably do the same thing, but had a sufficiently strange implementation that I want to investigate it separately. Fixes #26333.
* | Merge pull request #26226 from schneems/schneems/explicit-public-urlsRichard Schneeman2016-08-316-20/+199
|\ \ | | | | | | Make public asset use explicit
| * | Fix styleschneems2016-08-302-31/+31
| | |
| * | Better keyword argument nameschneems2016-08-301-3/+3
| | |
| * | Address comment via @dhh, better option namingschneems2016-08-303-23/+23
| | |
| * | Explicitly mention defaults.schneems2016-08-292-2/+2
| | |
| * | Document public_poster_folder optionschneems2016-08-291-0/+4
| | |
| * | Address doc style comments from @robin850schneems2016-08-292-10/+10
| | |
| * | Fix asset_pipeline.md miss-mergeschneems2016-08-291-7/+7
| | |
| * | Specify version of Sprockets-rails this will be inschneems2016-08-291-1/+1
| | |
| * | Set unknown_asset_fallback false only new appsschneems2016-08-291-1/+1
| | |
| * | Move default to different initializerschneems2016-08-293-16/+4
| | | | | | | | | | | | | | | Is this usage correct? cc/ @prathamesh-sonpatki
| * | Thanks rubocopschneems2016-08-291-1/+1
| | |
| * | [ci skip] configuring.md assets.unknown_asset_fallbackschneems2016-08-291-0/+2
| | |
| * | [ci skip] asset_pipeline.md assets.unknown_asset_fallbackschneems2016-08-291-7/+20
| | |
| * | [ci skip] Upgrading assets.unknown_asset_fallbackschneems2016-08-291-0/+12
| | |
| * | Fix initializerschneems2016-08-291-1/+1
| | |
| * | Fully document asset_path.schneems2016-08-291-7/+58
| | |
| * | Do not deprecate using assets with leading slashschneems2016-08-291-10/+5
| | |
| * | Default assets.unknown_asset_fallback to falseschneems2016-08-291-0/+4
| | |
| * | Missed 2 public_* methods in cleanupschneems2016-08-291-16/+0
| | |
| * | Favor `public_folder: true` over `public_*`schneems2016-08-293-169/+47
| | | | | | | | | | | | Adding all those `public_*` methods is a bit heavy handed, we can change the API to instead use `public_folder: true`. Change was pretty easy since it was already implemented that way.
| * | Fix formattingschneems2016-08-293-26/+25
| | |
| * | Add `public_*` helpers to all the `_tag` methods.schneems2016-08-292-19/+73
| | |
| * | Test `public_` methods.schneems2016-08-291-0/+72
| | |
| * | Match method signatureschneems2016-08-291-3/+3
| | |
| * | Add docs to `public_*_path` methods & fix commentsschneems2016-08-291-15/+36
| | |
| * | Add public URL helpersschneems2016-08-291-0/+56
| | |
| * | Add descriptive commentschneems2016-08-291-7/+7
| | |
| * | Make sure routes don't interfere with pathsschneems2016-08-291-0/+11
| | |
| * | Allow a more explicit public behaviorschneems2016-08-291-2/+37
| | | | | | | | | | | | | | | We want to make it more explicit when a user wants to avoid the asset pipeline to do this we will add `public_*` methods to all path helpers. So if someone wants to use an asset that isn't maintained by the asset pipeline they can use `public_asset_path` instead of `asset_path` and letting it fall through. The main reason for this change is the desire to raise helpful errors in the future. Right now if you typo an asset name, then we assume you intended an asset in the `public/` folder and not in the pipeline so nothing fails and the error sits silently until you realize the page didn't render correctly. We have to deprecate today so we can raise meaningful error messages in the future.
* | | Merge pull request #26283 from kamipo/use_splat_hash_for_optionsSean Griffin2016-08-311-6/+1
|\ \ \ | | | | | | | | Use splat `options` hash for `has_and_belongs_to_many`
| * | | Use splat `options` hash for `has_and_belongs_to_many`Ryuta Kamizono2016-08-261-6/+1
| | | | | | | | | | | | | | | | For simplicity.
* | | | Merge pull request #26282 from kamipo/add_type_default_valueSean Griffin2016-08-319-15/+13
|\ \ \ \ | | | | | | | | | | Add `Type.default_value` and use it everywhere for internal
| * | | | Add `Type.default_value` and use it everywhere for internalRyuta Kamizono2016-08-269-15/+13
| | | | | | | | | | | | | | | | | | | | For reduce instantiating `Type::Value`.
* | | | | Ensure that inverse associations are set before running callbacksSean Griffin2016-08-3114-24/+77
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If a parent association was accessed in an `after_find` or `after_initialize` callback, it would always end up loading the association, and then immediately overwriting the association we just loaded. If this occurred in a way that the parent's `current_scope` was set to eager load the child, this would result in an infinite loop and eventually overflow the stack. For records that are created with `.new`, we have a mechanism to perform an action before the callbacks are run. I've introduced the same code path for records created with `instantiate`, and updated all code which sets inverse instances on newly loaded associations to use this block instead. Fixes #26320.
* | | | | Merge pull request #26327 from mechanicles/remove-duplicationGuillermo Iguaran2016-08-301-2/+6
|\ \ \ \ \ | |_|_|_|/ |/| | | | Refactor remove duplication.
| * | | | Refactor remove duplication.Santosh Wadghule2016-08-311-2/+6
| | | | |
* | | | | Merge pull request #26331 from kjellberg/broken-linksJon Moss2016-08-303-3/+3
|\ \ \ \ \ | | | | | | | | | | | | [ci skip] Broken links in documentation fix
| * | | | | [ci skip] Broken links in documentation fixRasmus Kjellberg2016-08-303-3/+3
| | | | | |
* | | | | | Merge pull request #23498 from jcoleman/remove-unnecessary-belongs-to-loadMatthew Draper2016-08-313-1/+14
|\ \ \ \ \ \ | | | | | | | | | | | | | | Don't unnecessarily load a belongs_to when saving.
| * | | | | | Don't unnecessarily load a belongs_to when saving.James Coleman2016-08-263-1/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, if the the association was previously loaded and then the foreign key changed by itself, a #save call would trigger a load of the new associated record during autosave. This is unnecessary and the autosave code (in that case) didn't use the loaded record anyways.
* | | | | | | Merge pull request #26329 from riseshia/patch-1Jon Moss2016-08-301-12/+7
|\ \ \ \ \ \ \ | |_|_|/ / / / |/| | | | | | Update typo & Make explanation more clear
| * | | | | | Update typo & Make explanation more clearShia2016-08-311-12/+7
|/ / / / / /