/**
  * @param RuleGroupRepositoryInterface $repository
  *
  * @param RuleGroup                    $ruleGroup
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function destroy(RuleGroupRepositoryInterface $repository, RuleGroup $ruleGroup)
 {
     $title = $ruleGroup->title;
     $moveTo = Auth::user()->ruleGroups()->find(intval(Input::get('move_rules_before_delete')));
     $repository->destroy($ruleGroup, $moveTo);
     Session::flash('success', trans('firefly.deleted_rule_group', ['title' => $title]));
     Preferences::mark();
     return redirect(Session::get('rules.rule-group.delete.url'));
 }