Project

General

Profile

Defect #5219 » project.rb.diff

Yuki Kita, 2010-04-05 14:26

View differences:

app/models/project.rb (working copy)
# reserved words
validates_exclusion_of :identifier, :in => %w( new )
before_destroy :delete_all_members, :destroy_children
before_destroy :delete_all_members
named_scope :has_module, lambda { |mod| { :conditions => ["#{Project.table_name}.id IN (SELECT em.project_id FROM #{EnabledModule.table_name} em WHERE em.name=?)", mod.to_s] } }
named_scope :active, { :conditions => "#{Project.table_name}.status = #{STATUS_ACTIVE}"}
......
return nil
end
end
# Override ActiveRecord::Base#destroy
def destroy
destroy_children
super
end
private
(2-2/2)