Skip to content

Instantly share code, notes, and snippets.

@lonelydimple
Created December 6, 2012 02:15
Show Gist options
  • Select an option

  • Save lonelydimple/4221307 to your computer and use it in GitHub Desktop.

Select an option

Save lonelydimple/4221307 to your computer and use it in GitHub Desktop.
def initialize_mismitched_activities
if attribute_present?(:mismatched_activities=)
self.mismatched_activities ||= Set.new
end
end
def merchants_underwriting_class_list=(list)
self.merchants_underwriting_class_numbers = list.to_s.split(/[^\d]+/).map{ |i| i.to_i }.sort.uniq
end
def merchants_underwriting_class_list
self.merchants_underwriting_class_numbers.uniq.sort.map{ |c| c.to_s }.join(", ")
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment