Is there any possibility to properly convert ActiveRecord table name to model class name? I have found one hack
def model_for_table(table_name) table_name.
ObjectSpace.each_object(Class).select{ |klass| klass < ActiveRecord::Base }.index_by(&:table_name)
It is not the fastest thing in the world though