lib/scenarios/scenario_db.rb in scenario_server-0.1.1 vs lib/scenarios/scenario_db.rb in scenario_server-0.1.2

- old
+ new

@@ -234,12 +234,11 @@ def get_routes_for_scenario(scenario_id) return self.routes.filter(:scenario_id=>scenario_id).select(:id, :scenario_id, :route_type, :path, :status_code, :headers, :fixture).to_a end def get_fixture_from_routes(route_type, path, scenario_name) - self.routes.left_outer_join(:scenarios, :id=>:scenario_id).where(:route_type=>route_type, - :path=>path, - :name=>scenario_name).map([:status_code, :headers, :fixture]).first + self.routes.left_outer_join(:scenarios, + :id=>:scenario_id).where{Sequel.&({:route_type => route_type, :name=>scenario_name}, Sequel.ilike(:path,path))}.map([:status_code,:headers,:fixture]).first end def get_route(route_id) return self.routes.where(:id => route_id).first