I am quite new to Ruby on Rails so this might have a very simple
answer… My problem gives the following error message when I try to
call the count function for an item.
Mysql::Error: Unknown column ‘TournamentTemplate’ in ‘where clause’:
SELECT count(*) AS count_all FROM action_logs WHERE
(action_logs.loggable_id = 1 AND action_logs.loggable_type =
The row that generates the error looks like this:
<% if item and item.action_logs.count > 0 %>
Action_logs is a polymorphic class, so “item” can be one of many
loggable classes. The model file looks like this:
class ActionLog < ActiveRecord::Base
belongs_to :loggable, :polymorphic => true
By the way, the application was working fine until I moved it to a
different server. That server is fresh install of red hat enterprise 4.
I’m most grateful for any help to fix this.