This commit is contained in:
Toks
2014-02-28 19:02:30 -05:00
parent fee7228aaf
commit 5d5caf5eea
4 changed files with 5 additions and 5 deletions

View File

@@ -2,7 +2,7 @@ class ArtistCommentary < ActiveRecord::Base
attr_accessible :post_id, :original_description, :original_title, :translated_description, :translated_title
validates_uniqueness_of :post_id
belongs_to :post
has_many :versions, :class_name => "ArtistCommentaryVersion", :foreign_key => :post_id, :primary_key => :post_id, :order => "artist_commentary_versions.id ASC"
has_many :versions, :class_name => "ArtistCommentaryVersion", :dependent => :destroy, :foreign_key => :post_id, :primary_key => :post_id, :order => "artist_commentary_versions.id ASC"
after_save :create_version
def original_present?