I am currently developing an Rails 3.2 web app and on this app I will allow multiple tenants. In other words, this is a SaaS service where companies can create accounts.
Each company can have multiple projects which in their turn can have multiple tasks. My simple question is. Should I add account_id to both projects AND tasks tables or will it due with only on projects table? The reason I am thinking of going with both is security.
I know I can do simple associations and it works fine but is it more "secure" to add account_id to all child tables?