Skip to content
Snippets Groups Projects
Commit 74b9c465 authored by Nils Caspar's avatar Nils Caspar
Browse files

Fix adding non-regex service rules

parent 4d84e8df
Branches
Tags
No related merge requests found
......@@ -5,6 +5,7 @@ namespace :casino do
desc 'Add a service rule (prefix the url parameter with "regex:" to add a regular expression)'
task :add, [:name, :url] => :environment do |task, args|
include CASino::ProcessorConcern::ServiceTickets
service_rule = CASino::ServiceRule.new name: args[:name]
match = /^regex:(.*)/.match(args[:url])
if match.nil?
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment