Closed jahammo2 closed 2 years ago
I have figured out the issue.
Something might be different about interface
now. However, I was probably not using it properly from the beginning. I have since switched over to using object
or record
and things are working now. However, it appears you must add the class
option (or the from
option). That's where I went wrong when I initially tried using object
and record
. I should have done this:
record :public_study_set, class: StudySet
object :user, class: User
I admittedly don't know when I should use record
vs object
. I just know they both seem to work interchangeably for my app.
I am going to close this issue now. But I really want to let you know, Aaron, that I am so thankful for the work you have put into this gem. It's close to a decade of you maintaining it and I am so, so appreciative of it. I know it's not easy and takes a lot of your time. So, thank you very, very much.
Hey!
First of all, I've been using this gem for like 5 years and love the work you all have done. Thank you.
Second, I'm having an issue with the filters after upgrading.
The problem
I've upgraded to 4.1.0 and the
interface
filter is no longer working as expected. Specifically, I used to be able to pass something likeUser.first
to an interaction with a filter likeinterface :user
but not anymore. Now it that will throw anActiveModel::Error
. Here are the code details.The interaction
The code I run
from
rails c
:The full result I get
My gem versions
Worth noting
object :user
filter and therecord :user
filter also didn't work. Though I didn't expect it to.I am currently in the middle of my Rails 6.1 upgrade. And when I was upgrading, I received this error:
It's what made me upgrade active_interaction in the first place.
Follow ups
Is there something missing that I was supposed to do in the upgrade? Perhaps
interface
no longer functions as simply as it used to and I need to change it in some way?Thank you!