Commit Graph

5 Commits

Author SHA1 Message Date
Ryuta Kamizono 6d291aaa02 `attribute` should not require a connection is established
#41166 made `attribute` require a connection due to calling
`ActiveRecord::Type.adapter_name_from` immediately.

This fixes `adapter_name_from` to get the adapter name from the
connection db config to not retrieve a connection.
2021-02-02 15:04:23 +09:00
Kir Shatrov 831be98f9a Use frozen-string-literal in ActiveRecord 2017-07-19 22:27:07 +03:00
Matthew Draper 87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Sean Griffin 8c837e5fcc Add a global type registry, used to lookup and register types
As per previous discussions, we want to give users the ability to
reference their own types with symbols, instead of having to pass the
object manually. This adds the class that will be used to do so.

    ActiveRecord::Type.register(:money, MyMoneyType)
2015-02-15 14:22:08 -07:00