10 Apr '16, 10am

Simple #Multitenancy with #Rails and #Pundit

If we stick with the standard IDs that Rails gives us, we’re going to run into a potential problem. As we create models and add them in our app we’re going to get urls like this: http://yourapp.com/client/3. The problem is that the ID numbers won’t match up with the user’s experience. This Client (with id: 3) will be the third Client created, regardless of which user created it. This isn’t that big of a deal (if we’re scoping things correctly it won’t matter if a user types in an ID that doesn’t belong to them) but it may be a bit weird or confusing. My thinking is: if this number is going to represent a random abstraction, let’s go all out and really make it truly random. (If this doesn’t matter to you, feel free to skip this step!)

Full article: http://andrewmarkle.com/2016/04/06/multitenancy-with-pund...

Tweets

Simple Multitenancy with Rails and Pundit

rubyflow.com 10 Apr '16, 2am

× The Ruby and Rails community linklog Made a library? Written a blog post? Found a useful tutorial? Share it with the Rub...

One Rails App With Many Databases

rubyflow.com 10 Apr '16, 1am

× The Ruby and Rails community linklog Made a library? Written a blog post? Found a useful tutorial? Share it with the Rub...

4 Mind-Blowingly Simple Steps to Optimize Your ...

searchenginejournal.com 14 Apr '16, 11am

I honestly can’t decide which step is my favorite. But I do know this–they are all important. Many businesses spend a grea...

One Rails App With Many Databases

blrice.net 10 Apr '16, 1am

A traditional Rails application uses a single database. Programmers interact with it by writing models that inherit from A...

Passive income is simple: One of the many ways ...

thefinance.sg 14 Apr '16, 12am

One of the many ways that rich people have invented to make us poor people feel better is to swamp us with movies remindin...