cirandas.net

ref: master

plugins/avaliacoes/lib/avaliacoes_plugin/active_record.rb


 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
class AvaliacoesPlugin::ActiveRecord < ActiveRecord::Base

  self.abstract_class = true
  self.primary_key = :Chave
  alias_attribute :id, :Chave

  config = YAML::load File.read("#{File.dirname __FILE__}/../../config/database.yml")

  establish_connection config

end