fix_typo_changeset_parents.diff

Toshi MARUYAMA, 2011-09-06 15:13

Download (1.53 KB)

View differences:

app/models/changeset.rb
22 22
  belongs_to :user
23 23
  has_many :changes, :dependent => :delete_all
24 24
  has_and_belongs_to_many :issues
25
  has_and_belongs_to_many :parents, :class_name => 'Changeset', :join_table => 'changesets_parents',
26
    :association_foreign_key => 'parent_id', :foreign_key => 'changeset_id'
27
  has_and_belongs_to_many :children, :class_name => 'Changeset', :join_table => 'changesets_parents',
28
    :association_foreign_key => 'changeset_id', :foreign_key => 'parent_id'
25
  has_and_belongs_to_many :parents,
26
                          :class_name => "Changeset",
27
                          :join_table => "#{table_name_prefix}changeset_parents#{table_name_suffix}",
28
                          :association_foreign_key => 'parent_id', :foreign_key => 'changeset_id'
29
  has_and_belongs_to_many :children,
30
                          :class_name => "Changeset",
31
                          :join_table => "#{table_name_prefix}changeset_parents#{table_name_suffix}",
32
                          :association_foreign_key => 'changeset_id', :foreign_key => 'parent_id'
29 33

  
30 34
  acts_as_event :title => Proc.new {|o| "#{l(:label_revision)} #{o.format_identifier}" + (o.short_comments.blank? ? '' : (': ' + o.short_comments))},
31 35
                :description => :long_comments,