use industrial code to find the subdomain. use arel scopes that are explicit and expressive.