From f145db46f1fd19f15bb8869b61c093ee2e0dd664 Mon Sep 17 00:00:00 2001 From: Rafael Schouten Date: Thu, 16 Oct 2014 16:49:49 +1100 Subject: [PATCH] use self.x --- app/models/enterprise.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/models/enterprise.rb b/app/models/enterprise.rb index ab4dccf8ec..3654f272d4 100644 --- a/app/models/enterprise.rb +++ b/app/models/enterprise.rb @@ -212,14 +212,14 @@ class Enterprise < ActiveRecord::Base end def is_distributor - not self.sells == "none" + self.sells != "none" end # Simplify enterprise categories for frontend logic and icons, and maybe other things. def category # Make this crazy logic human readable so we can argue about it sanely. - cat = is_primary_producer ? "producer_" : "non_producer_" - cat << "sells_" + sells + cat = self.is_primary_producer ? "producer_" : "non_producer_" + cat << "sells_" + self.sells # Map backend cases to front end cases. case cat @@ -261,7 +261,7 @@ class Enterprise < ActiveRecord::Base end def strip_url(url) - url.andand.sub /(https?:\/\/)?/, '' + url.andand.sub(/(https?:\/\/)?/, '') end def set_unused_address_fields