app/controllers/map_topic/location_posts_controller.rb
# TODO - reopen topic model and add this there:
reopen topic model and add this there.
reopen topic model and add this there .
def ensure_category topic, capability
      country = topic.geo.country_lower
      city = topic.geo.city_lower
      admin_user = User.where(:admin => true).last
      question_color = '0E76BD' 
      countries_color = '8C6238' 
      cities_color = nil
      if city == topic.geo.bounds_value
        country_cat = create_geo_category country.titleize, admin_user, countries_color, nil
        city_cat = create_geo_category city.titleize, admin_user, cities_color, country_cat
        topic.category = city_cat
      else
        region_or_country_cat = create_geo_category topic.geo.bounds_value.titleize, admin_user, countries_color, nil
        topic.category = region_or_country_cat
      end
      topic.save!
    end
def ensure_category topic , capability country = topic . geo . country_lower city = topic . geo . city_lower admin_user = User . where ( :admin => true ) . last question_color = '0E76BD' countries_color = '8C6238' cities_color = nil if city == topic . geo . bounds_value country_cat = create_geo_category country . titleize , admin_user , countries_color , nil city_cat = create_geo_category city . titleize , admin_user , cities_color , country_cat topic . category = city_cat else region_or_country_cat = create_geo_category topic . geo . bounds_value . titleize , admin_user , countries_color , nil topic . category = region_or_country_cat end topic . save! end
TODO - reopen topic model and add this there:
TODO - reopen topic model and add this there :
# darker blue # 'F7941D' # orange # question_color = '92278F' # purple #brown # gigs_color = 'EA1D25' #red # binding.pry # assuming bounds_value will never be 'unknown' # if capability && capability == "question" #   capability_cat_name = city.titleize + " - Question" # end # binding.pry
topic
<not_specific>
capability
<not_specific>