David Oudiette


760 Experience
7 Lessons Completed
0 Questions Solved


Posted in User Avatars with ActiveStorage Discussion

Would be interesting to see if it's possible to extend that to add remote URL for avatars — would replace things like Carrierwave pretty much entirely. Another nice to have for a future tutorial: previewing the avatar before saving.

Posted in Send in-app invitations?

I'm building a platform where Users belong to Teams, and I want whoever creates a team to:

a) Be added as a team member, potentially with a particular status ("team_owner")

b) Be able to send invitations to existing app users to add them to the team

So far, all I've done is create the models for Users and Teams, and a has_many :through association (TeamMemberships). I started looking for gems offering invitations, but most of them seem to cater to email invitations for slightly different purposes (sending emails to invite new users to register, etc.).

Should I just roll my own, and if so, what would be the simplest way to go?

Essentially, I just want people to be able to create teams, but realized when doing that that I didn't want all users to be able to add all users to their team, or for someone to join just any team. So I'm trying to build the simplest authorization system possible to mitigate that — so if there's something simpler than invitations to do that, I'm all ears!

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.