A developer's journey through BrowserCms.

Monday, April 1, 2013

app/models/cms.rb
This little file is responsible for appending "cms_" to all the table names for Cms models so that the actual table names in the database are not actually prefixed.  The only exception seems to be Cms::Attachment.
module Cms
  def self.table_name_prefix
    #'cms_'
    ''
  end
end
In order for my tests to run in my application that uses browsercms, I needed to configure an empty string to be returned.  The development environment had already weeded out 'cms_' somewhere else in the code.  The test environment needs to have this value set to empty string.

No comments:

Post a Comment