Jake Anderson
Joined
Activity
Hey Chris! I'm really enjoying episodes like this one that seek to replace common jQuery solutions. There's a number of people on my team who come from the WP world, who used jQuery a lot, but are now trying to stay away from it. The simplicity and quickness here is hard to beat.
One thing I ran into, and I don't know if it's something with Firefox, is that the items within the template were submitting to the server, causing it to not properly convert the strong params. Any one else seeing this? Rails didn't like "NEW_VALUE" as a hash key. (I'm using it for a nested has_many)
I was able to solve it by adding a disabled: local_assigns.fetch(:disabled, false)
attribute to all inputs in my fields partial, passing that value as true
for my template partial, and then removing that disabling in Stimulus via our "addAssociation" method.
Thanks for the quick response! That's what I thought initally as well, but I'm getting an undefined method error for sign_in
. I tried including the Devise::Controllers::SignInOut
module, which is where this method is held, but then I get a warden error.
I'm struggling to figure out where to put sign_in(user, store: false)
to prevent the rails server from setting the cookies. It says to put it where we "log in the user" but to my understanding, that was handled by the success!
method.
Could someone please provide a little more direction on how to prevent that cookie from being set?
On a similar note, is there a way to not make it update the current_sign_in_at
, last_sign_in_at
and sign_in_count
values?
Thanks! :)