- 21 2月, 2019 7 次提交
-
-
由 Xavier Noria 提交于
-
由 Vipul A M 提交于
[ci skip] actionview typo fixes.
-
由 alkesh26 提交于
-
由 Ryuta Kamizono 提交于
This covers what #34626 fixes.
-
由 Ryuta Kamizono 提交于
Reduce unused allocations when casting UUIDs for Postgres
-
由 Rafael França 提交于
Deprecate ActionView::PathSet as argument to ActionView::Base.new
-
由 Carl Thuringer 提交于
Using the subscript method `#[]` on a string has several overloads and rather complex implementation. One of the overloads is the capability to accept a regular expression and then run a match, then return the receiver (if it matched) or one of the groups from the MatchData. The function of the `UUID#cast` method is to cast a UUID to a type and format acceptable by postgres. Naturally UUIDs are supposed to be string and of a certain format, but it had been determined that it was not ideal for the framework to send just any old string to Postgres and allow the engine to complain when "foobar" or "" was sent, being obviously of the wrong format for a valid UUID. Therefore this code was written to facilitate the checking, and if it were not of the correct format, a `nil` would be returned as is conventional in Rails. Now, the subscript method will allocate one or more strings on a match and return one of them, based on the index parameter. However, there is no need for a new string, as a UUID of the correct format is already such, and so long as the format was verified then the string supplied is adequate for consumption by the database. The subscript method also creates a MatchData object which will never be used, and so must eventually be garbage collected. Garbage collection indeed. This innocuous method tends to be called quite a lot, for example if the primary key of a table is a uuid, then this method will be called. If the foreign key of a relation is a UUID, once again this method is called. If that foreign key is belonging to a has_many relationship with dozens of objects, then again dozens of UUIDs shall be cast to a dup of themselves, and spawn dozens of MatchData objects, and so on. So, for users that: * Use UUIDs as primary keys * Use Postgres * Operate on collections of objects This accomplishes a significant savings in total allocations, and may save many garbage collections.
-
- 20 2月, 2019 22 次提交
-
-
由 Cliff Pruitt 提交于
Currently, `ActionView::Base.new` will raise a `NotImplementedError` when given an instance of `ActionView::PathSet` on initialization. This commit prevents the raised error in favor of a deprecation warning.
-
由 Vipul A M 提交于
[ci skip] Updated the documentation for bulk delete in activerecord
-
由 Abhay Nikam 提交于
-
由 Ryuta Kamizono 提交于
Replaced usage of where.delete/destroy_all with delete/destroy_by
-
由 Ryuta Kamizono 提交于
Fix reset of the source association when through association is loaded
-
由 Ryuta Kamizono 提交于
-
由 Bogdan Gusiev 提交于
The special case happens when through association has a custom scope that is applied to the source association when loading. In this case, the soucre association would need to be reset after main association is loaded. See tests. The special case exists when a through association has
-
由 Ryuta Kamizono 提交于
Merge pull request #35325 from abhaynikam/add-query-method-delegation-test-for-destory-by-and-delete-by Added delegation tests for delete_by and destroy_by methods
-
由 Abhay Nikam 提交于
-
由 Abhay Nikam 提交于
-
由 Aaron Patterson 提交于
Deprecate LookupContext#rendered_format
-
由 Xavier Noria 提交于
Let Zeitwerk integration unhook AS::Dependencies
-
由 Aaron Patterson 提交于
We no longer depend on `rendered_format` side effects, so we can remove this method now.
🎉 -
由 Aaron Patterson 提交于
Return rendered template objects from renderers
-
由 Xavier Noria 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
This commit introduces "rendered template" and "rendered collection" objects. The template renderers can now return a more complex object than just strings. This allows the framework to get more information about the templates that were rendered. In this commit we use the rendered template object to set the "rendered_format" on the lookup context in the controller rather than all the way in the template renderer. That means we don't need to check the "rendered_format" every time we render a template, we just do it once after all templates have been rendered.
-
由 Aaron Patterson 提交于
This commit is to remove direct access to the "rendered_format" attribute on the lookup context. "rendered_format" is an implementation detail that we shouldn't test directly.
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
-
由 Aaron Patterson 提交于
Pass the template format to the digestor
-
由 Gannon McGibbon 提交于
Reset column info after making Topic tz-aware
-
- 19 2月, 2019 11 次提交
-
-
由 Ryuta Kamizono 提交于
Introduce delete_by and destroy_by methods to ActiveRecord::Relation
-
由 Ryuta Kamizono 提交于
This reverts commit 6b69ae51, reversing changes made to 84bd9ada. Reason: We already use "happen" a lots for callbacks and validations. https://github.com/rails/rails/pull/35324#issuecomment-465096483 [ci skip]
-
由 Abhay Nikam 提交于
-
由 Vipul A M 提交于
Update active_record_callbacks.md [ci skip]
-
由 Sharang Dashputre 提交于
Change 'happen' to a more technical term
-
由 Ryuta Kamizono 提交于
Don't allow `where` with invalid value matches to nil values
-
由 Shodai Suzuki 提交于
-
由 Shodai Suzuki 提交于
-
由 Gannon McGibbon 提交于
In AttributeMethodsTest, we make the global Topic class time zone-aware which changes instance date time attribute casting behaviour. We need to reset column info after the test because future tests don't expect Topic date time columns to be time zone-aware.
-
由 Ryuta Kamizono 提交于
Actionpack typo fix [ci skip]
-
由 alkesh26 提交于
-