wiki page func test

This commit is contained in:
albert
2011-02-02 16:11:26 -05:00
parent 17a631b88c
commit 099c75f9b6
7 changed files with 111 additions and 4 deletions

View File

@@ -9,7 +9,7 @@ class WikiPage < ActiveRecord::Base
scope :titled, lambda {|title| where(["title = ?", title.downcase.tr(" ", "_")])}
has_one :tag, :foreign_key => "name", :primary_key => "title"
has_one :artist, :foreign_key => "name", :primary_key => "title"
has_many :versions, :class_name => "WikiPageVersion"
has_many :versions, :class_name => "WikiPageVersion", :dependent => :destroy
def self.build_relation(options = {})
relation = where()