You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 16, 2022. It is now read-only.
I'm a bit late to the party but for a Family Justice project I've made this gem works with non-AR models. In case it is useful this is the specific PR implementing a date field in a non-AR object:
The main reason why it was not working is because non-AR models doesn't implement callbacks out of the box. But you can extend your model to use callbacks.
Also, so the gem works out of the box, the methods [] and []= must be re-implemented in your model. This is because the gem uses in a couple places this syntax to have direct access to attributes bypassing getter/setter. Ideally the gem shouldn't rely on these methods so it is less coupled to AR.
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I'm trying to use this helper in a form class which is not particularly tied to an ActiveRecord class and I'm getting the following error:
Is it possible to provide support for this helper outside the scope of an ActiveRecord?
The text was updated successfully, but these errors were encountered: