- 21 1月, 2015 9 次提交
-
-
由 Santosh Wadghule 提交于
-
由 Sean Griffin 提交于
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 ```
-
由 Rafael Mendonça França 提交于
SanitizeHelper documentation formatting fixes + rewrite
-
由 T.J. Schuck 提交于
[ci skip]
-
由 T.J. Schuck 提交于
-
由 T.J. Schuck 提交于
-
由 Rafael Mendonça França 提交于
TransactionManager should call rollback records
-
由 Arthur Neves 提交于
-
由 Jeremy Kemper 提交于
Support after_commit callbacks in transactional fixtures
-
- 20 1月, 2015 6 次提交
-
-
由 Yves Senn 提交于
-
由 Yves Senn 提交于
Add an `:if_exists` option to `drop_table`
-
由 Sean Griffin 提交于
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)
-
由 Sean Griffin 提交于
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.
-
由 Sean Griffin 提交于
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.
-
由 Sean Griffin 提交于
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`.
-
- 19 1月, 2015 19 次提交
-
-
由 Rafael Mendonça França 提交于
fix dependency
-
由 Yves Senn 提交于
Fix wording in AR CHANGELOG about time columns change [ci skip]
-
由 Yves Senn 提交于
Use force: true options for creating tables in bug templates
-
由 Abdelkader Boudih 提交于
fix typo in number_field_tag documentation [ci skip]
-
由 yuuji.yaginuma 提交于
-
由 Stefan Kanev 提交于
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.
-
由 Prathamesh Sonpatki 提交于
- 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.
-
由 Prathamesh Sonpatki 提交于
-
由 Santiago Pastorino 提交于
Fix name_for_action in routing
-
由 Santiago Pastorino 提交于
Use EXEEXT
-
由 rono23 提交于
-
由 Santiago Pastorino 提交于
Remove unused accessor
-
由 Santiago Pastorino 提交于
Run SQL only if attribute changed for update_attribute method
-
由 Ryuta Kamizono 提交于
-
由 Xavier Noria 提交于
Should escape regexp wildcard character `.`
-
由 Ryuta Kamizono 提交于
`.` is regexp meta character. It should be escape for `assert_match` correctly.
-
由 Sean Griffin 提交于
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.
-
由 Sean Griffin 提交于
-
由 Sean Griffin 提交于
-
- 18 1月, 2015 6 次提交
-
-
由 Prathamesh Sonpatki 提交于
- This is based on https://github.com/rails/rails/issues/18400 but tackling same issue with update_attribute method instead of update method.
-
由 Santiago Pastorino 提交于
[ci skip] Move a introduction of `Module.nesting`
-
由 Santiago Pastorino 提交于
Use existing constant for joining instead of '_'
-
由 Prathamesh Sonpatki 提交于
-
由 Abdelkader Boudih 提交于
remove reference to `Logger` core extensions from guide [ci skip]
-
由 Guillermo Iguaran 提交于
nodoc ActionView::ModelNaming module
-