Revision 723:d41bf754c0f2 app/models

View differences:

app/models/project.rb
597 597
    'custom_field_values',
598 598
    'custom_fields',
599 599
    'tracker_ids',
600
    'issue_custom_field_ids'
600
    'issue_custom_field_ids',
601
    'has_welcome_page'
601 602

  
602 603
  safe_attributes 'enabled_module_names',
603 604
    :if => lambda {|project, user| project.new_record? || user.allowed_to?(:select_project_modules, project) }
app/models/ssamr_user_detail.rb
10 10
      institution_id.blank? and other_institution.blank?
11 11
  end
12 12

  
13

  
13
  def institution_name()
14
    if not self.institution_type.nil?
15
      if self.institution_type
16
        Institution.find(self.institution_id).name
17
      else
18
        self.other_institution
19
      end
20
    else
21
      ""
22
    end
23
  end
14 24
end
app/models/user.rb
54 54
  
55 55
  has_one :ssamr_user_detail, :dependent => :destroy, :class_name => 'SsamrUserDetail'
56 56
  accepts_nested_attributes_for :ssamr_user_detail
57
  
58
  has_one :author
57 59

  
58 60
  # Active non-anonymous users scope
59 61
  named_scope :active, :conditions => "#{User.table_name}.status = #{STATUS_ACTIVE}"

Also available in: Unified diff