module TagHelper

Constants

KINDS

Public Instance Methods

deal_kind(str) click to toggle source
# File lib/helper/tag_helper.rb, line 5
def deal_kind(str)
  kinds = str.scan(KINDS).first.to_s
  kinds = '其他' if kinds.blank?
  kinds
end
deal_subkind(str) click to toggle source
# File lib/helper/tag_helper.rb, line 11
def deal_subkind(str)
  if str.include?("-")
    sub_kinds = str.slice((/-/ =~ str).to_i + 1,str.length)
  end
end