aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* rails -> Rails [ci skip]Prathamesh Sonpatki2013-05-095-5/+5
|
* "rails" -> "Rails" [ci skip]Xavier Noria2013-05-092-4/+4
|
* Fix that JSON and XML exception responses should give the HTTP error message ↵Jeremy Kemper2013-05-082-4/+4
| | | | for their status, by default, not the message from the underlying exception
* Merge pull request #10523 from neerajdotname/last-where-clause-winsJeremy Kemper2013-05-081-13/+12
|\ | | | | Extraction to enable fixing #10421
| * extracted piece of code into a methodNeeraj Singh2013-05-081-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In order to fix #10421 I need to enable merge to take an option so that relations could be merged without making the last where condition to win. That fix would forever reside in 4-0-stable branch and would not be merged to master since using scope without lambda has been deprecated. In this commit I have extracted code into a method and I think it makes code look better. Hence the request to merge it in both master and 4-0-stable. If there is any concern then this code can be merged only in 4-0-stable and that would be fine too.
* | use public send on the scope parametersAaron Patterson2013-05-081-1/+1
| |
* | add test for object conditional with scopeAaron Patterson2013-05-081-0/+19
| |
* | using strings as scopes is not used anywhere, so remove itAaron Patterson2013-05-081-1/+1
| |
* | adding a class conditional testAaron Patterson2013-05-081-0/+12
| |
* | adding tests for lambdas as conditionsAaron Patterson2013-05-082-1/+41
| |
* | Merge branch 'polycb'Aaron Patterson2013-05-081-22/+48
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | * polycb: separate identification computation separate filters from source code if the callbacks are not the same class, they cannot be duplicates fix object comparison case polymorphic comparison operator
| * | separate identification computationAaron Patterson2013-05-081-24/+18
| | |
| * | separate filters from source codeAaron Patterson2013-05-081-20/+31
| | |
| * | if the callbacks are not the same class, they cannot be duplicatesAaron Patterson2013-05-081-2/+6
| | |
| * | fix object comparison caseAaron Patterson2013-05-081-1/+5
| | |
| * | polymorphic comparison operatorAaron Patterson2013-05-081-11/+24
| | |
* | | Merge pull request #10524 from wangjohn/define_method_for_callbacksRafael Mendonça França2013-05-081-18/+12
|\ \ \ | |/ / |/| | Using define method instead of class eval when defining model callbacks.
| * | Using define method instead of class eval when defining model callbacks.wangjohn2013-05-081-18/+12
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Based on my benchmark results, this change improves performance substantially when defining callbacks. This benchmark (https://gist.github.com/wangjohn/5542610) was run using the current master and also using my experimental branch which replaced class_eval with define_single_method. Using class_eval (current master): user system total real 10 trials 0.000000 0.000000 0.000000 ( 0.001568) 50 trials 0.020000 0.000000 0.020000 ( 0.021715) 500 trials 0.110000 0.000000 0.110000 ( 0.115357) 1000 trials 0.250000 0.000000 0.250000 ( 0.260025) 10000 trials 2.560000 0.000000 2.560000 ( 2.568408) 50000 trials 12.800000 0.010000 12.810000 ( 12.886871) Using define_single_method (experimental branch): user system total real 10 trials 0.000000 0.000000 0.000000 ( 0.000790) 50 trials 0.000000 0.000000 0.000000 ( 0.002960) 500 trials 0.050000 0.010000 0.060000 ( 0.055690) 1000 trials 0.100000 0.000000 0.100000 ( 0.094073) 10000 trials 0.890000 0.000000 0.890000 ( 0.900364) 50000 trials 4.650000 0.000000 4.650000 ( 4.686127)
* / we need to indicate the type of callbackAaron Patterson2013-05-081-2/+2
|/
* Merge pull request #10355 from burke/masterJeremy Kemper2013-05-081-39/+19
|\ | | | | Use Ruby's native Encoding functionality to implement `tidy_bytes`
| * Use ruby's Encoding support for tidy_bytesBurke Libbey2013-05-081-39/+19
| | | | | | | | | | | | | | | | | | | | The previous implementation was quite slow. This leverages some of the transcoding abilities built into Ruby 1.9 instead. It is roughly 96% faster. The roundtrip through UTF_8_MAC here is because ruby won't let you transcode from UTF_8 to UTF_8. I chose the closest encoding I could find as an intermediate.
* | Merge pull request #10521 from yahonda/sanitize_oracleRafael Mendonça França2013-05-081-5/+4
|\ \ | | | | | | Remove current_adapter? from test_sanitize_sql_hash_handles_associations
| * | Remove current_adapter? from test_sanitize_sql_hash_handles_associationsYasuo Honda2013-05-081-5/+4
| | | | | | | | | | | | | | | | | | | | | Because of each adapter implementation differences, `expected_value` string needed to be handled by each adapter. This commit removes current_adapter by using ActiveRecord::ConnectionAdapters::Quoting methods.
* | | adding more tests around callback inconsistenciesAaron Patterson2013-05-081-5/+47
| | |
* | | refactor tests for more pointsAaron Patterson2013-05-081-4/+5
| | |
* | | adding test to demonstrate inconsistencies in the AS::Callbacks apiAaron Patterson2013-05-081-0/+41
| |/ |/|
* | Merge pull request #10519 from eiel/dependency-core_ext-hash-diffRafael Mendonça França2013-05-081-0/+2
|\ \ | | | | | | dependency ActiveSupport::Deprecation
| * | dependency ActiveSupport::DeprecationTomohiko Himura2013-05-091-0/+2
|/ /
* | Merge pull request #10511 from prathamesh-sonpatki/existentJosé Valim2013-05-073-4/+4
|\ \ | | | | | | Fix Typo existant -> existent [ci skip]
| * | Fix Typo existant -> existent [ci skip]Prathamesh Sonpatki2013-05-083-4/+4
|/ /
* | Merge pull request #9522 from wangjohn/automatic_search_for_association_inversesJeremy Kemper2013-05-0711-10/+194
|\ \ | | | | | | Finding inverse associations automatically
| * | Created a method to automatically find inverse associations and cachewangjohn2013-05-0711-10/+194
|/ / | | | | | | | | | | the results. Added tests to check to make sure that inverse associations are automatically found when has_many, has_one, or belongs_to associations are defined.
* | Merge pull request #10506 from seanwalbran/fix-10502-skip-object-filterAaron Patterson2013-05-073-1/+28
|\ \ | | | | | | fix issue #10502, do not recompute method name for already-stringified object callback filter
| * | add changelog entry for fix-10502-skip-object-filterSean Walbran2013-05-071-0/+5
| | |
| * | fix issue #10502, do not recompute method name for already-stringified ↵Sean Walbran2013-05-072-1/+23
| | | | | | | | | | | | object filter
* | | Revert "Merge pull request #10455 from ↵Aaron Patterson2013-05-072-35/+2
|/ / | | | | | | | | | | | | patricksrobertson/bigserial_id_not_identifying_pk" This reverts commit 3043d45eefc3776d5f3a9e7d212a01f99d869ef8, reversing changes made to ca0275d36b395631725c4583db5a45c06443fdb9.
* | Merge pull request #10455 from patricksrobertson/bigserial_id_not_identifying_pkAaron Patterson2013-05-072-2/+35
|\ \ | |/ |/| Add PK constraint on bigserial ID columns on postgres adapter
| * Handle other pk types in PostgreSQL gracefully.Patrick Robertson2013-05-072-2/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | In #10410 it was noted that you can no longer create PK's with the type of bigserial in PostgreSQL in 4.0.0.rc1. This is mostly because the newer adapter is checking for column type with the id column instead of just letting it pass through like it did before. Side effects: You may just create a PK column of a type that you really don't want to be your PK. As far as I can tell this was allowed in 3.2.X and perhaps an exception should be raised if you try and do something extremely dumb.
* | Test that #fresh_when accepts an arrayBrandon Keepers2013-05-071-2/+19
|/ | | | https://github.com/rails/etagger/pull/3
* Merge pull request #10234 from dasch/dasch/fetch-multiRafael Mendonça França2013-05-063-1/+61
|\ | | | | Allow fetching multiple values from the cache at once
| * Allow fetching multiple values from the cache at onceDaniel Schierbeck2013-05-063-1/+61
| | | | | | | | | | Add a simple API for fetching a list of entries from the cache, where any missing entries are computed by a supplied block.
* | Merge pull request #10377 from bricker/template_digest_ending_with_numberRafael Mendonça França2013-05-064-3/+12
|\ \ | | | | | | Allow numbers in partial name for digesting
| * | Allow numbers in partial name for digestingBryan Ricker2013-05-064-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add failing test for template with number at the end Use \w for RENDER_DEPENDENCY regex Spacing Add CHANGELOG entry
* | | Merge pull request #10446 from dasch/instrument-template-compilationRafael Mendonça França2013-05-061-2/+9
|\ \ \ | |/ / |/| | Instrument template compilation
| * | Instrument template compilationDaniel Schierbeck2013-05-061-2/+9
| |/
* | Improve CHANGELOG entry [ci skip]Rafael Mendonça França2013-05-061-4/+4
| |
* | Merge pull request #10489 from greenriver/ar_counter_cache_multiple_destroyRafael Mendonça França2013-05-063-2/+28
|\ \ | | | | | | | | | | | | | | | | | | Confirm a record has not already been destroyed before decrementing counter cache Conflicts: activerecord/CHANGELOG.md
| * | Confirm a record has not already been destroyed before decrementingBen Tucker2013-05-063-1/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | counter cache At present, calling destroy multiple times on the same record results in the belongs_to counter cache being decremented multiple times. With this change the record is checked for whether it is already destroyed prior to decrementing the counter cache.
* | | Merge pull request #10478 from cainlevy/patch-1Rafael Mendonça França2013-05-061-1/+1
|\ \ \ | | | | | | | | use canonical #controller_path logic in controller test cases
| * | | use canonical #controller_path logic in controller test casesLance Ivy2013-05-051-1/+1
| | | |