Project

General

Profile

バグ #1001 » 0001-.patch

Satoshi Okuno, 2017-03-26 12:46

View differences:

core/plugin/intent_selector/intent_selector.rb
120 120
  # 条件に対して推奨されるintentの配列と、intentsに指定されたそれ以外の値の配列
121 121
  def divide_intents(intents, uri, model_slug)
122 122
    intent_slugs = UserConfig[:intent_selector_rules].select{|record|
123
      model_slug == record[:model].to_s && uri.to_s.start_with?(record[:str])
123
      ((record[:model] == nil) || (model_slug == record[:model].to_s)) && uri.to_s.start_with?(record[:str])
124 124
    }.map{|record|
125 125
      record[:intent].to_sym
126 126
    }
127
    intents.partition{|intent| intent_slugs.include?(intent.slug) }
127
    intents.partition{|intent| intent_slugs.include?(intent.slug.to_sym) }
128 128
  end
129 129

  
130 130
  # _model_ のmodel slugを文字列で得る。
131
- 
    (1-1/1)