app/models/taxon.rb
# Sometimes you don't want to make a new taxon name with a taxon, like when
# you're saving a new taxon name with a new associated taxon. Hence, this.
Sometimes you don't want to make a new taxon name with a taxon, like when
you're saving a new taxon name with a new associated taxon. Hence, this.
Sometimes you don ' t want to make a new taxon name with a taxon like when you ' re saving a new taxon name with a new associated taxon . Hence this .
def taxon_ranges_with_kml
    taxon_ranges = self.taxon_ranges.without_geom.includes(:source).limit(10).select(&:kml_url)
    taxon_range = if CONFIG.taxon_range_source_id
      taxon_ranges.detect{|tr| tr.source_id == CONFIG.taxon_range_source_id}
    end
    taxon_range ||= taxon_ranges.detect{|tr| !tr.range.blank?}
    [taxon_range, taxon_ranges - [taxon_range]].flatten
  end
def taxon_ranges_with_kml taxon_ranges = self . taxon_ranges . without_geom . includes ( :source ) . limit ( 10 ) . select ( & :kml_url ) taxon_range = if CONFIG . taxon_range_source_id taxon_ranges . detect { | tr | tr . source_id == CONFIG . taxon_range_source_id } end taxon_range ||= taxon_ranges . detect { | tr | ! tr . range . blank? } [ taxon_range , taxon_ranges - [ taxon_range ] ] . flatten end
Sometimes you don't want to make a new taxon name with a taxon, like when
you're saving a new taxon name with a new associated taxon.
Sometimes you don ' t want to make a new taxon name with a taxon like when you ' re saving a new taxon name with a new associated taxon .