resolve/refinerycms — pull request #1 by scambra (2013-10-18 01:53:17+00:00)
Title: Fix for table_name with database

I changed globalized conditions to use nested hashes, because I got Mysql2::Error: Unknown column 'main_database.refinery_page_translations.locale' in 'where clause':

The where clause was like: AND `main_database`.`refinery_page_translations.locale` = 'es' instead of `main_database`.`refinery_page_translations`.`locale` = 'es'

I changed table_name in Refinery::Page to include database in table_name, because I have a multiple db app. I only needed to change this line to get it working.