aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge pull request #18626 from splattael/jruby-headRafael Mendonça França2015-01-211-2/+2
|\ | | | | Travis: Test on jruby-head only for now
| * Travis: Test on jruby-head only for nowPeter Suschlik2015-01-211-2/+2
|/ | | | Arel head does not support 1.9 anymore.
* Merge pull request #18619 from ↵Carlos Antonio da Silva2015-01-211-0/+1
|\ | | | | | | | | morgoth/add-missing-dependency-to-activemodel-naming Add missing AS core extension dependency
| * Add missing AS core extension dependencyWojciech Wnętrzak2015-01-211-0/+1
| |
* | Merge pull request #18621 from morgoth/error-message-on-validation-guidesCarlos Antonio da Silva2015-01-211-1/+2
|\ \ | | | | | | Add missing options to Error Message Interpolation guide [CI skip]
| * | Add missing options to Error Message Interpolation guide [CI skip]Wojciech Wnętrzak2015-01-211-1/+2
| |/
* | Merge pull request #18620 from mechanicles/change-a-to-anXavier Noria2015-01-211-1/+1
|\ \ | |/ |/| Change 'a' to 'an' for 'attribute' word [ci skip]
| * Change 'a' to 'an' for 'attribute' word [ci skip]Santosh Wadghule2015-01-211-1/+1
|/
* Introduce `ActiveRecord::Base#accessed_fields`Sean Griffin2015-01-207-1/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This method can be used to see all of the fields on a model which have been read. This can be useful during development mode to quickly find out which fields need to be selected. For performance critical pages, if you are not using all of the fields of a database, an easy performance win is only selecting the fields which you need. By calling this method at the end of a controller action, it's easy to determine which fields need to be selected. While writing this, I also noticed a place for an easy performance win internally which I had been wanting to introduce. You cannot mutate a field which you have not read. Therefore, we can skip the calculation of in place changes if we have never read from the field. This can significantly speed up methods like `#changed?` if any of the fields have an expensive mutable type (like `serialize`) ``` Calculating ------------------------------------- #changed? with serialized column (before) 391.000 i/100ms #changed? with serialized column (after) 1.514k i/100ms ------------------------------------------------- #changed? with serialized column (before) 4.243k (± 3.7%) i/s - 21.505k #changed? with serialized column (after) 16.789k (± 3.2%) i/s - 84.784k ```
* Merge pull request #18557 from tjschuck/sanitize_doc_fixesRafael Mendonça França2015-01-201-76/+51
|\ | | | | SanitizeHelper documentation formatting fixes + rewrite
| * Single instead of double quotes T.J. Schuck2015-01-201-2/+2
| | | | | | [ci skip]
| * Rewrite SanitizeHelper docsT.J. Schuck2015-01-201-77/+50
| |
| * Fix code formatting in sanitize docsT.J. Schuck2015-01-201-9/+11
|/
* Merge pull request #18614 from arthurnn/rollback_records_parityRafael Mendonça França2015-01-202-6/+6
|\ | | | | TransactionManager should call rollback records
| * TransactionManager should call rollback recordsArthur Neves2015-01-202-6/+6
|/
* Merge pull request #18458 from brainopia/fix_after_commit_for_fixturesJeremy Kemper2015-01-205-22/+51
|\ | | | | Support after_commit callbacks in transactional fixtures
| * after_commit runs after transactions with non-joinable parentsbrainopia2015-01-165-22/+51
| | | | | | | | | | | | after_commit callbacks run after committing a transaction whose parent is not `joinable?`: un-nested transactions, transactions within test cases, and transactions in `console --sandbox`.
* | tests, use `drop_table if_exists: true` in our test suite.Yves Senn2015-01-209-13/+13
| |
* | Merge pull request #18597 from kamipo/add-if-exists-to-drop-tableYves Senn2015-01-205-3/+29
|\ \ | | | | | | Add an `:if_exists` option to `drop_table`
| * | Add an `:if_exists` option to `drop_table`Stefan Kanev2015-01-195-3/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If set to `if_exists: true`, it generates a statement like: DROP TABLE IF EXISTS posts This syntax is supported in the popular SQL servers, that is (at least) SQLite, PostgreSQL, MySQL, Oracle and MS SQL Sever. Closes #16366.
* | | Fix bind value copying from subqueried relationsSean Griffin2015-01-193-13/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the old implementation, the bind values were created, and then we search the attributes for `Relation` objects, and merge them. This completely ignores the order that the actual `where` clause will use. If all non-relation where parameters are before the relations, it will work. However, if we query on both a relation and a value, with the value coming second, it breaks. The order of the hash should not affect the final query (especially since hashes being ordered is an implementation detail)
* | | Move `create_binds` over to the `PredicateBuilder`Sean Griffin2015-01-193-34/+31
| | | | | | | | | | | | | | | | | | I'm looking to introduce a `WhereClause` class to handle most of this logic, and this method will eventually move over to there. However, this intermediate refactoring should make that easier to do.
* | | Whether a column exists or not doesn't affect whether we can use bindsSean Griffin2015-01-192-7/+4
| | | | | | | | | | | | | | | | | | Looking through the blame, this logic used to be when we actually created the bind tuple. My guess is that `nil` couldn't be handled there at that time. It can, now.
* | | Don't mutate bind values in `Relation`Sean Griffin2015-01-192-2/+1
| | | | | | | | | | | | | | | | | | | | | In order to better facilitate refactoring, most places that mutated `bind_values` have already been removed. One last spot snuck through. Since we're no longer mutating the array, it also does not need to be duped in `initialize_copy`.
* | | Merge pull request #18450 from tonytonyjan/patch-1Rafael Mendonça França2015-01-191-0/+2
|\ \ \ | | | | | | | | fix dependency
| * | | fix dependencyJian Weihang2015-01-121-0/+2
| | | |
* | | | Merge pull request #18593 from prathamesh-sonpatki/ar-changelogYves Senn2015-01-191-1/+1
|\ \ \ \ | | | | | | | | | | Fix wording in AR CHANGELOG about time columns change [ci skip]
| * | | | Fix wording in AR CHANGELOG about time columns change [ci skip]Prathamesh Sonpatki2015-01-191-1/+1
| | |/ / | |/| |
* | | | Merge pull request #18594 from prathamesh-sonpatki/use-force-true-in-templatesYves Senn2015-01-192-4/+4
|\ \ \ \ | | | | | | | | | | Use force: true options for creating tables in bug templates
| * | | | Use force: true options for creating tables in bug templatesPrathamesh Sonpatki2015-01-192-4/+4
| |/ / / | | | | | | | | | | | | | | | | | | | | | | | | - Generally we have to run the bug templates multiple times to get them right and it always complains because the posts and comments tables already exist due to earlier runs. - Using force: true will eliminate this issue.
* | | | Merge pull request #18600 from y-yagi/fix_number_field_tag_exampleAbdelkader Boudih2015-01-191-2/+2
|\ \ \ \ | |/ / / |/| | | fix typo in number_field_tag documentation [ci skip]
| * | | fix typo in number_field_tag documentation [ci skip]yuuji.yaginuma2015-01-191-2/+2
|/ / /
* | | Merge pull request #18483 from rono23/fix-name_for_action-in-routingSantiago Pastorino2015-01-192-2/+41
|\ \ \ | | | | | | | | Fix name_for_action in routing
| * | | Fix name_for_action in routingrono232015-01-192-2/+41
| | | |
* | | | Merge pull request #18380 from nobu/Use-EXEEXTSantiago Pastorino2015-01-191-1/+3
|\ \ \ \ | | | | | | | | | | Use EXEEXT
| * | | | Use EXEEXTNobuyoshi Nakada2015-01-071-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use the configured variable EXEEXT, instead of hardcoded suffix and platform names. And on such platforms, files which do not end with the suffix are not executable, so the original names are not necessary, in general.
* | | | | Merge pull request #18591 from kamipo/remove_unused_accessorSantiago Pastorino2015-01-181-1/+1
|\ \ \ \ \ | | | | | | | | | | | | Remove unused accessor
| * | | | | Remove unused accessorRyuta Kamizono2015-01-191-1/+1
| | | | | |
* | | | | | Merge pull request #18501 from prathamesh-sonpatki/nosqlSantiago Pastorino2015-01-183-1/+15
|\ \ \ \ \ \ | |/ / / / / |/| | | | | Run SQL only if attribute changed for update_attribute method
| * | | | | Run SQL only if attribute changed for update_attribute methodPrathamesh Sonpatki2015-01-183-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This is based on https://github.com/rails/rails/issues/18400 but tackling same issue with update_attribute method instead of update method.
* | | | | | Merge pull request #18586 from kamipo/should_escape_regexp_wildcard_characterXavier Noria2015-01-1814-34/+34
|\ \ \ \ \ \ | | | | | | | | | | | | | | Should escape regexp wildcard character `.`
| * | | | | | Should escape regexp wildcard character `.`Ryuta Kamizono2015-01-1914-34/+34
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | `.` is regexp meta character. It should be escape for `assert_match` correctly.
* | | | | | Don't calculate in-place changes on attribute assignmentSean Griffin2015-01-183-1/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When an attribute is assigned, we determine if it was already marked as changed so we can determine if we need to clear the changes, or mark it as changed. Since this only affects the `attributes_changed_by_setter` hash, in-place changes are irrelevant to this process. Since calculating in-place changes can be expensive, we can just skip it here. I also added a test for the only edge case I could think of that would be affected by this change.
* | | | | | Use bundler 1.7 on travisSean Griffin2015-01-181-0/+1
| | | | | |
* | | | | | Include stackprof on ruby 2.2 as well as 2.1Sean Griffin2015-01-181-1/+1
|/ / / / /
* | | | | Merge pull request #18576 from yui-knk/fix/autoload4Santiago Pastorino2015-01-181-3/+2
|\ \ \ \ \ | | | | | | | | | | | | [ci skip] Move a introduction of `Module.nesting`
| * | | | | [ci skip] Move a introduction of `Module.nesting`yui-knk2015-01-181-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move a introduction of `Module.nesting` to the beginning of sentence. This change will help reader to try to dump `nesting`.
* | | | | | Merge pull request #18579 from ↵Santiago Pastorino2015-01-181-1/+1
|\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | prathamesh-sonpatki/use-existing-constant-for-join Use existing constant for joining instead of '_'
| * | | | | | Use existing constant for joining instead of '_'Prathamesh Sonpatki2015-01-181-1/+1
| | | | | | |
* | | | | | | Merge pull request #18578 from y-yagi/remove_logger_extensionsAbdelkader Boudih2015-01-181-44/+0
|\ \ \ \ \ \ \ | |/ / / / / / |/| | | | | | remove reference to `Logger` core extensions from guide [ci skip]