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

Where does the test get started? #41

Closed
ScotterC opened this issue Mar 20, 2012 · 2 comments
Closed

Where does the test get started? #41

ScotterC opened this issue Mar 20, 2012 · 2 comments
Labels

Comments

@ScotterC
Copy link

I'm loading a page with jQuery's load() method. It still hits the rails controller for the html and then passes it back and jquery loads a particular div within the page.

In development. I can pass in the ab_test query and get the proper layout. The test is 'product_cart_form' and my alternative is flipped. The div it's rendering is 'insertion' which contains my ab_test.

load(href + '?product_cart_form=flipped .insertion')

This hits the rails controller and properly displays the right test html. However, the test never shows up unless I place the parameter in and also never finishes correctly. Always going to the default.

Is the test not initialized in the controller? If not, can I manually start it, either via javascript or in the rails controller?

EDIT:

The ab_test was occurring in a partial one more level deep then the div that was being rendered by jquery. When I switched the test to testing two different partials instead of using a ab_test block inside one partial it works flawlessly. Not sure what to make of the prior problem.

@ghost ghost assigned andrew Mar 31, 2012
@andrew
Copy link
Member

andrew commented Apr 6, 2012

The test is initialised the first time that the ab_test method gets called, wether that is in the controller or a view doesn't matter.

Perhaps your template was being cached and so the logic of the ab_test method was never run again?

@andrew andrew closed this as completed Apr 6, 2012
@ScotterC
Copy link
Author

ScotterC commented Apr 6, 2012

Caching is disabled. It's working in a production environment so I haven't put much thought into it since. I'll let you know if I can narrow it down more.

@andrew andrew removed their assignment Nov 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants