Activity
You'll want to have a separate model for the profile (I guess a Venue or Musician model?), that way they can live on their own. You can have an optional "owner" which can determine if it's claimed or not.
For an unclaimed profile, you'll need to figure out some way of handling that. Obviously, you don't want random people taking over profiles so there would need to be some sort of verification process. You can probably have them submit some proof and you can manually approve it on the backend.
If you require someone to be signed in as a User, then they could submit a form to claim ownership of a Venue or Musician profile. When you "approve", it would just be assigning the owner_id column on the record to the User's ID basically. Does that help?
Hey all! I've updated this lesson to include find_each in the SyncAllJob as well as a test to ensure it queues up the correct jobs. 👍
Posted in Ruby's Tap Method Discussion
Just tap it in. Give it a little tappy. Tap tap taparoo.
Eric, add the openssl gem to your Gemfile to fix that error. Should be fixed in Ruby 4 too as that'll include the latest openssl built-in to Ruby.
Excited to kick off a SaaS product series. Should we build more end-to-end projects like this?
Posted in Module extend self Discussion
The point of extend self is you can use it both ways.
Posted in Module extend self Discussion
This is such a handy feature of Ruby. I was amazed when I first learned about it. Really makes modules useful for any situation, not just being included in another object.
The add_foreign_key docs show all the various options for on_delete and others: https://api.rubyonrails.org/classes/ActiveRecord/ConnectionAdapters/SchemaStatements.html#method-i-add_foreign_key
Posted in Path update to RoR 8?
All those projects work exactly the same in Rails 8.
Posted in Pro
Hey Francisco, just cancel your subscription after 3 months 👍
Posted in Morse Code with Ruby - Part 1 Discussion
.. / .-.. --- ...- . / --. --- .-. .- .. .-.. ...
Do you have any favorite Rubocop rules?
Posted in Ruby Pattern Matching Discussion
What version of Ruby added this?
@Nathan nope, I don't think there were any changes. If you run into any issues, let me know. 👍
@Frank Underwood, check out our GoRails Learning Path for a structured way of learning Rails. We designed it with repetition in mind so concepts sink in as you build several different projects.
Posted in remove the class="simple-form"
Nope. I haven't used that gem in probably 10+ years.
See my last comment on how to disable that class with the deprecated config.
Posted in remove the class="simple-form"
Seems like it is config.form_class even though it's deprecated.
It appears to be using both the new and deprecated options:
https://github.com/heartcombo/simple_form/blob/c2c7faf3e532072e1ef511a97d677ae0e7c38957/lib/simple_form/action_view_extensions/form_helper.rb#L20-L23
Posted in remove the class="simple-form"
Try setting it to an empty string instead.
Posted in remove the class="simple-form"
Looks like this may be the config option for it: https://github.com/search?q=repo%3Aheartcombo%2Fsimple_form%20default_form_class&type=code
Not yet, but I imagine it'll be around Rails World 2025.