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

Problematic interaction with kaminari gem #121

Open
jeremymburton opened this issue Jan 8, 2015 · 1 comment
Open

Problematic interaction with kaminari gem #121

jeremymburton opened this issue Jan 8, 2015 · 1 comment

Comments

@jeremymburton
Copy link

My pattern is as follows:

  • page loads

  • page contains a table paginated using kaminari - all the links in the paginator look fine - they look like this, e.g.:

    /workers?page=2

  • page also contains multipart & remote form (to upload a CSV file), as enabled by remotipart

  • submitting this form correctly posts the data to the Rails controller

  • Rails controller processes the file

  • Rails controller then renders a .js.erb file

  • Inside the .js.erb file, it renders a partial of the view and then swaps the current content for that new rendered version

Everything works...except that the links inside the paginator now look like this:

<a href="/workers?X-Http-Accept=text%2Fjavascript%2C+application%2Fjavascript%2C+application%2Fecmascript%2C+application%2Fx-ecmascript%2C+%2A%2F%2A%3B+q%3D0.01&amp;X-Requested-With=IFrame&amp;authenticity_token=%2FxEao%2BCxeuJp4FzXFzTgIteFIk%2Bgzw%2Bnqvh1aljG2WY%3D&amp;commit=Import&amp;file=%23%3CActionDispatch%3A%3AHttp%3A%3AUploadedFile%3A0x007fa33156ccb0%3E&amp;page=2&amp;remotipart_submitted=true&amp;utf8=%E2%9C%93" rel="next">2</a>

These links don't work since they load a page containing a textarea with the page content.

@esbanarango
Copy link
Collaborator

@jeremymburton could you share the way you have set your form, and also your response form the server. Thanks

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