public ActionResult Create(PostEditModel model)
		{
			ViewBag.Title = "Create";
			if (ModelState.IsValid)
			{
				var url = PostHelpers.MakeUrl(DateTime.Today.Year,DateTime.Today.Month,DateTime.Today.Day,model.Title);

				_postRepository.Create(new Post
				{
					AuthorId = _userRepository.GetCurrentUser().Id,
					DraftBody = model.Body,
                    DraftDescription = model.Description,
					Posted = DateTime.Now,
					DraftTitle = model.Title,
					Status = PostStatus.Draft,
					Path = url,
					Canonical = model.Reposted ? model.CanonicalUrl : "/" + url,
                    ExcludeFromFeed = false,
                    PostGuid = Guid.NewGuid()
				});

				return RedirectToAction("Index");
			}
			return View("Edit", model);

		}
		public ActionResult Edit(int id, PostEditModel model)
		{
			ViewBag.Title = "Edit";
			if (ModelState.IsValid)
			{
				var post = _postRepository.GetBy(p => p.Id == id);

                var pm = PostModification.GetUnmodifiedPostModification();
                pm.PostId = id;

                if (model.Body != post.Body && model.Body != post.DraftBody)
                {
                    pm.BodyModified = true;
                    pm.NewBody = model.Body;
                }

                if (model.Description != post.Description && model.Description != post.DraftDescription)
                {
                    pm.DescriptionModified = true;
                    pm.NewDescription = model.Description;
                }

                if (model.CanonicalUrl != post.Canonical)
                {
                    pm.CannonicalModified = true;
                    pm.NewCannonical = model.CanonicalUrl;
                }

                if (model.Title != post.Title && model.Title != post.DraftTitle)
                {
                    pm.TitleModified = true;
                    pm.NewTitle = model.Title;
                }

                if (pm.HasModifications())
                {
                    _postModificationRepository.Create(pm);
                    post.DraftTitle = model.Title;
                    post.DraftDescription = model.Description;
                    post.DraftBody = model.Body;
				    post.Canonical = model.Reposted ? model.CanonicalUrl : "/" + post.Path;
				    _postRepository.Update(post);
                }

				return RedirectToAction("Index");
			}
			return View(model);
		}