public ActionResult AddRule(UpsertRuleViewModel model)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    Rule newRule = new Rule();

                    newRule.clanId = (int)ClanManager.GetClanId(User.Identity.GetUserId());
                    newRule.description = model.Description;

                    RuleManager.Insert(newRule);
                }
            }
            catch
            {
                return View();
            }

            return RedirectToAction("Index");
        }
        public ActionResult EditRule(UpsertRuleViewModel model)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    Rule newRule = RuleManager.SelectByRuleId(model.RuleId);
                    newRule.description = model.Description;
                    RuleManager.Update(newRule);
                }
            }
            catch
            {
                return View();
            }

            return RedirectToAction("Index");
        }