I have a PostgreSQL database for my Rails application. In the schema named \'public\' the main Rails models tables are stored etc. I have created a \'discogs\' schema which
The correct one for rails 4.2 is as:
class Foo < ActiveRecord::Base self.table_name = 'myschema.foo' end
More info -http://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-table_name-3D