gabriele garretto

Joined

720 Experience
6 Lessons Completed
0 Questions Solved

Activity

Posted in "rails for beginners part 21"

thank you very much, you'r the man!🙌

Posted in "rails for beginners part 21"

thanks for the answer chris, i actually was running rails 6.0, since I'm implementing this course on an app that i was already building on 6.0, do you think i should upgrade it or i risk to brake something?

Posted in "rails for beginners part 21"

i cant make work user.signed_id, it raises a no_method_error:

irb(main):010:0> user.signed_id
Traceback (most recent call last):
2: from (irb):9
1: from (irb):10:in rescue in irb_binding'
NoMethodError (undefined method
signed_id' for #User:0x00007fc2ad38d728)

fiddling around i tryed user.to_signed_global_id:

irb(main):011:0> user.to_signed_global_id.to_s
=> "BAh7CEkiCGdpZAY6BkVUSSIaZ2lkOi8vZmlzaHJvb20vVXNlci84BjsAVEkiDHB1cnBvc2UGOwBUSSIMZGVmYXVsdAY7AFRJIg9leHBpcmVzX2F0BjsAVEkiHTIwMjEtMDMtMDlUMTU6Mzc6NDUuNzM3WgY7AFQ=--3d69db1dd78c21da26d108891727e32948b1d3f3"
irb(main):012:0> user.to_signed_global_id(expires_in:15.minutes)
=> #, @verifier=#, @purpose="default", @expires_at=Tue, 09 Feb 2021 15:54:00 UTC +00:00>
irb(main):013:0>

is this the same thing as signed_id? why in the video of chris this all thing does work?

Posted in "rails for beginners part 14"

I don't understand how chris browser gives back all the result without the option local:true in the code of the form, in the new action? My end wouldn't show me even the error page in the browser, then i saw in my server console that was just sending a js and i remembered that forms are default handled in ajax. what am i missing, why chris's work?