Wednesday, August 22, 2012

Rails model use a table name different from its class name

class RequestBase < ActiveRecord::Base
    self.table_name = "requests"
    ...
end

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.