Мое приложение rails отлично работает на моей машине с mysql.Но на Heroku я получаю следующую ошибку: http://pastie.org/1697772
Мой kategoris_helper:
module KategorisHelper
def sortkat(column, title = nil)
title ||= column.titleize
css_class = column == sort_column ? "current #{sort_direction}" : nil
direction = column == sort_column && sort_direction == "asc" ? "desc" : "asc"
link_to title, {:sort => column, :direction => direction}, {:class => css_class}
end
end
Мой контроллер Kategoris:
class KategorisController < ApplicationController
@kategori = Kategori.find(:first, :conditions => "cached_slug = '#{params[:id]}'")
@konkurrencer = @kategori.konkurrancers.order(sort_column + " " + sort_direction)
@titel = @kategori.name
end
private
def sort_column
Konkurrancer.column_names.include?(params[:sort]) ? params[:sort] : "created_at"
end
def sort_direction
%w[desc asc].include?(params[:direction]) ? params[:direction] : "desc"
end
end
Мои модели:
class Kategori < ActiveRecord::Base
has_many :konkurrancers
has_friendly_id :name, :use_slug => true
end
class Konkurrancer < ActiveRecord::Base
belongs_to :kategori
has_friendly_id :name, :use_slug => true
end