support AR scopes when attr is defined in a module