def to_param_names_array(params)
      params.split(',').map { |p| p.gsub(/[\(\)\s]/, '').gsub(/=.+$/, '') }.reject { |p| p.nil? || p.empty? }
    end
def to_param_names_array(params)
      params.split(',').map { |p| p.gsub(/[\(\)\s]/, '').gsub(/=.+$/, '') }.reject { |p| p.nil? || p.empty? }
    end
Extracts parameter names as an *Array*.
 e.g. "()" -> []
 e.g. "(a, b = 'foo')" -> ["a", "b"]