Yassine Hafidi

Joined

3,270 Experience
32 Lessons Completed
0 Questions Solved

Activity

Posted in Base62 Encoding Short Codes Discussion

the code is the same. If I initialize the local variable result with:
result =+"" or result = String.new
no errors, tests passing

Posted in Base62 Encoding Short Codes Discussion

Hi Chris,
why the local variable result is treated as frozen?
Here is the error:
Error:
ShortCodeTest#test_encode_10:
FrozenError: can't modify frozen String: ""
app/models/short_code.rb:20:in prepend'
app/models/short_code.rb:20:in
encode'
test/models/short_code_test.rb:15:in `block in class:ShortCodeTest'

Posted in Shrine: get URL of uploaded with host

I use shrine for uploading excel sheets. I need to process those files.
How can I get the url but with host? I tried the plugin default_url. But it doesn't work

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more.

© 2024 GoRails, LLC. All rights reserved.