-
-
Notifications
You must be signed in to change notification settings - Fork 161
5.0 Upgrade Guide
Piotr Solnica edited this page Apr 24, 2019
·
3 revisions
We've dropped support for MRI < 2.4, which obviously means that the prerequisite is to upgrade your Ruby, if you're on < 2.4.
In 5.0 rom-mapper
is gone. If you have it in your Gemfile
, simply remove it.
If you use Repository#aggregate
change it to Relation#combine
, ie:
# 4.x
class UserRepo < ROM::Repository[:users]
def get(id)
aggregate(:account).by_pk(id).one
end
end
# 5.x
class UserRepo < ROM::Repository[:users]
def get(id)
users.combine(:account).by_pk(id).one
end
end
Information about aliases is now stored within the attribute object itself. To upgrade:
# 4.x
attribute :username, Types::String.meta(alias: :name)
# 5.x
attribute :username, Types::String, alias: :name
All occurences of Types::Int
must be renamed to Types::Integer
.
Please go through the changelogs too:
If you need help, ask a question either on our forum or our community chat.