Sha256: 76a576f20f3b0b36fc282804df6d1a10a72a0bad878a21d02fe2a54f051922dd
Contents?: true
Size: 504 Bytes
Versions: 16
Compression:
Stored size: 504 Bytes
Contents
module Dotclear2 class Post < ActiveRecord::Base set_table_name 'dc_post' set_primary_key 'post_id' establish_connection configurations['dc2'] has_many :comments, :foreign_key => 'post_id', :class_name => 'Dotclear2::Comment' has_many :tags, :foreign_key => 'post_id', :class_name => 'Dotclear2::Tag' belongs_to :categorie, :foreign_key => 'cat_id', :class_name => 'Dotclear2::Category' def self.prefix=(prefix) set_table_name "#{prefix}_post" end end end
Version data entries
16 entries across 16 versions & 1 rubygems