app/controllers/runs_controller.rb
# for selection by radio button of tree
for selection by radio button of tree
for selection by radio button of tree
def tree_condition(query, entity_name)
    leaf_mark = Position::With_Singular_Leaf
    if query.end_with?(leaf_mark)
      query = query.mb_chars[0..-2]
      ["#{entity_name}.fullname = :query", {:query => query}]
    else
      ["#{entity_name}.fullname LIKE :query", {:query => "#{query}%"}]
    end
  end
def tree_condition ( query , entity_name ) leaf_mark = Position :: With_Singular_Leaf if query . end_with? ( leaf_mark ) query = query . mb_chars [ 0 .. - 2 ] [ "#{entity_name}.fullname = :query" , { :query => query } ] else [ "#{entity_name}.fullname LIKE :query" , { :query => "#{query}%" } ] end end
for selection by radio button of tree
for selection by radio button of tree
query
<not_specific>
entity_name
<not_specific>