This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ruby 1.9.3, Redmine 1.4.* | |
Query.find_each do |q| | |
q.filters.each do |key, filter| | |
filter[:values].each do |value| | |
value.force_encoding("UTF-8") | |
end | |
q.filters[key] = filter.dup | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Encoding: UTF-8 | |
require 'mysql' | |
# Запросы | |
class Queries | |
attr_reader :results | |
CREATE_SQL = 'CREATE TABLE test (id INT NOT NULL AUTO_INCREMENT, field VARCHAR(20), PRIMARY KEY (id)) ENGINE=INNODB' | |
DROP_SQL = 'DROP TABLE test' |