class DoesntMatch
def initialize(options)
@options = options
end
def matches?(request)
@options.inject(true) { |m, (k,v)|
m && (request.send(k) !~ v)
}
end
end
match "/:url" => "main#article", as: :article, constraints: DoesntMatch.new(path: /^\/favicon\.ico/)
UPDATE `table` SET `category` = '0' WHERE `category` = '1'
Encoding.default_external = Encoding::UTF_8
Encoding.default_internal = Encoding::UTF_8