Moved to Google Blogger

Hi Folks & Followers,

I’ve moved this blog to: http://myrailscraft.blogspot.com .

I’ve ported over all the blogs, same order, and the Q&A comments.

Please continue to follow me there.

I will delete this tumblr blog in a few months.

Happy Rails Crafting!

Anonymous said: Do you happen to have an example application where you use Milia? Something with Tenants, Users, Comments, and possibly some entity that has a join table, where you use the where clause?

yes, look in the test/rails_app directory. A basic working set up is there.

Anonymous said: In the updatable view ad rules approach, how do you handle scenarios where you have a table with a unique index (e.g. varchar(50)) and two different tenants want to insert a row with the same key?

That’s a great question and a situation which I hadn’t considered.

My initial thoughts are that you’d use a Rails validator which would therefore just check within the context of the tenant. You’d set up your migration DB index specification to be dual: 

      add_index :profiles, [:tenant_id, :something_else]