You might use  Katello::CapsuleLifecycleEnvironments.table_name.  its bit us in the past when we've hard coded table names.