How to list schemas in postgres from rails console?

Viewed 2918

I would like to get a list of schemas in the current database from the rails console. Currently, I am executing raw sql to get the info via

ActiveRecord::Base.connection.execute("select schema_name from information_schema.schemata")

Is there a more correct way to retrieve this information from the rails console with ActiveRecord?

2 Answers
Related