app/models/applications/application_for_offering.rb
def restricted_number_of_awards
    n = nil
    other_awards.each do |other_award|
      restricted_number = other_award.restrict_number_of_awards_to
      unless restricted_number.blank?
        n = restricted_number if n.nil? || restricted_number < n
      end
    end
    n
  end
# If any of the +other_awards+ associated with this application include an award number restriction, this method will return
# the total number of allowed awards for this applicant. If there are no restrictions, returns nil.
If any of the +other_awards+ associated with this application include an award number restriction, this method will return
the total number of allowed awards for this applicant. If there are no restrictions, returns nil.
If any of the + other_awards + associated with this application include an award number restriction this method will return the total number of allowed awards for this applicant . If there are no restrictions returns nil .
def restricted_number_of_awards
    n = nil
    other_awards.each do |other_award|
      restricted_number = other_award.restrict_number_of_awards_to
      unless restricted_number.blank?
        n = restricted_number if n.nil? || restricted_number < n
      end
    end
    n
  end
def restricted_number_of_awards n = nil other_awards . each do | other_award | restricted_number = other_award . restrict_number_of_awards_to unless restricted_number . blank? n = restricted_number if n . nil? || restricted_number < n end end n end
If any of the +other_awards+ associated with this application include an award number restriction, this method will return
the total number of allowed awards for this applicant.
If any of the + other_awards + associated with this application include an award number restriction this method will return the total number of allowed awards for this applicant .