Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot trigger SplitViews when controller is under Areas #4

Open
xcameleonx opened this issue Sep 16, 2014 · 1 comment
Open

Cannot trigger SplitViews when controller is under Areas #4

xcameleonx opened this issue Sep 16, 2014 · 1 comment

Comments

@xcameleonx
Copy link

AB Testing works if the controller is on the Controllers folder in root of the project, but when moved to an Area I only ever get the first action to trigger, even if I weight the ratio heavily in favour of the second. I have looked at the other issue, and it's been said that no changes need to be made to the route. So I'm wondering if you can help.

Area Registration:

namespace ABTestProto.Areas.Test
{
    public class TestAreaRegistration : AreaRegistration 
    {
        public override string AreaName 
        {
            get 
            {
                return "Test";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context) 
        {
            context.MapRoute(
                "Test_default",
                "Test/{controller}/{action}/{id}",
                new { action = "Index", id = UrlParameter.Optional }
            );
        }
    }
}

SplitView Controller:

namespace ABTestProto.Areas.Test.Controllers
{
    public class AbTestingController : AbTestMasterController
    {
        [SplitView("Ver1", "Test", "Goal", 0.00001)]
        public ActionResult Index()
        {
            return View();
        }

        [SplitView("Var2", "Test", "Goal", 0.99999)]
        public ActionResult Index2()
        {
            return View();
        }

        [SplitGoal("Goal")]
        [HttpPost]
        public ActionResult Confirm()
        {
            return View("~/Views/ABTest/Goal.cshtml");
        }
    }
}
@htayebi
Copy link
Owner

htayebi commented Oct 6, 2014

This issue has been addressed in the most recent push. Have a test and let me know if there are any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants