aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Cache to_datetime for performanceAndrew White2016-09-011-1/+1
| | | | | | | As demonstrated in #25880 the to_time method converts the utc time instance to a local time instance which is an expensive operation. Since to_datetime involves similar expensive operations we should also cache it to speed up comparison with lots of values.
* Merge pull request #26354 from shingo-nakanishi/fix_documentVipul A M2016-09-011-1/+2
|\ | | | | fix document for radio_button [ci skip]
| * fix document for radio_buttonshingo-nakanishi2016-09-011-1/+2
|/ | | | add `# Let's say that @user.receive_newsletter returns "no":` for `def radio_button(object_name, method, tag_value, options = {})`. fix `# Let's say that @user.category returns "no":` to `# Let's say that @user.receive_newsletter returns "no":`
* Merge pull request #26351 from y-yagi/fix_ruby_warningSean Griffin2016-08-311-3/+3
|\ | | | | remove warning from `video_tag`
| * remove warning from `video_tag`yuuji.yaginuma2016-09-011-3/+3
| | | | | | | | | | | | | | | | This removes the following warning. ``` actionview/lib/action_view/helpers/asset_tag_helper.rb:291: warning: shadowing outer local variable - options ```
* | Merge pull request #25758 from vipulnsward/fix-key-len-issueMatthew Draper2016-09-014-9/+39
|\ \ | |/ |/| Follow up of #25602
| * Start passing cipher from EncryptedCookieJar since we use it to determine ↵Vipul A M2016-09-014-22/+26
| | | | | | | | key length
| * Follow up of #25602Vipul A M2016-09-013-15/+41
|/ | | | | | | | | Since keys are truncated, ruby 2.4 doesn't accept keys greater than their lenghts. keys of same value but different lenght and greater than key size of cipher, produce the same results as reproduced at https://gist.github.com/rhenium/b81355fe816dcfae459cc5eadfc4f6f9 Since our default cipher is 'aes-256-cbc', key length for which is 32 bytes, limit the length of key being passed to Encryptor to 32 bytes. This continues to support backwards compat with any existing signed data, already encrupted and signed with 32+ byte keys. Also fixes the passing of this value in multiple tests.
* Merge pull request #26346 from Devinsuit/masterJon Moss2016-08-311-1/+1
|\ | | | | Update Jason Zimdars twitter
| * Update Jason Zimdars twitterDevinsuit2016-08-311-1/+1
| |
* | Add changelog entry for #26328.Kasper Timm Hansen2016-08-311-0/+7
| | | | | | | | | | I consider the missing deprecation warning a bug fix from the point of view of the 5.0.x series and forward.
* | Move to_param undef closer to the deprecations.Kasper Timm Hansen2016-08-311-2/+4
| | | | | | | | | | | | | | Makes it clearer why we're doing this Add a comment to elaborate on what the undef means and move it closer to the deprecations so it's less likely for whoever pulls the deprecations that it should go too.
* | Merge pull request #26328 from kirs/strong-params-to-paramKasper Timm Hansen2016-08-312-0/+9
|\ \ | |/ |/| Do not allow to_param on AC::Parameters
| * Do not allow to_param on AC::ParametersKir Shatrov2016-08-312-0/+9
| |
* | 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
| | | |