Is there any way we could configure `Spree::Base` ...
# general
b
Is there any way we could configure
Spree::Base
to extend from
ApplicationRecord
instead of
ActiveRecord::Base
?
k
Not at the moment, Why do you need to do that?
b
In my app: I would like
scope :paginate
to be available everywhere. Generally speaking, if I add a method to
ApplicationRecord
I would expect it to be available in Solidus.
k
I think we were not using it for backward compatibility with older Rails versions (
ApplicationRecord
) has been introduced in Rails 5 and we were supporting Rails 4.x at as well at that time. It might be a good change for Solidus now.
b
We could also add it to the solidus config
k
Yes, that’s what I was thinking as well
new stores will get
ApplicationRecord
, old ones need to change that explicitly, so backward compatibility is respected