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

Deleting comment raises ActiveRecord::RecordNotFound #50

Closed
jhollinger opened this issue Feb 23, 2012 · 4 comments
Closed

Deleting comment raises ActiveRecord::RecordNotFound #50

jhollinger opened this issue Feb 23, 2012 · 4 comments

Comments

@jhollinger
Copy link
Contributor

The ajax comment delete action from the Dashboard throws an ActiveRecord::RecordNotFound exception in Admin::CommentController#find_comment.

@jhollinger
Copy link
Contributor Author

asyncDeleteForm is being called three times. The second two are causing the error.

@jhollinger
Copy link
Contributor Author

Hmm, exact same problem with "undo". The overall cause is that destroyAndUndoBehaviour is being called three times, and clicks and submits it binds are being called three times too. (Talking to myself here, but it helps me keep things straight.)

@jhollinger
Copy link
Contributor Author

For the record, this was effectively preventing the appropriate undo action (e.g. appending an undeleted comment to an html table) from firing. Patch fixes that, too.

@xaviershay
Copy link
Owner

I think is related to assets pipelining including all the JS rather than just those for specific pages. Investigating.

gaelian pushed a commit to gaelian/enki that referenced this issue Oct 3, 2013
This JS was not written to be bundled together, but with the new Rails
asset pipeline that is exactly what happens. As a result, multiple
conflicting behaviours were being added to each form. This commit
ensures that only the desired behaviour is applied to each page.

Fixes xaviershay#50.
gaelian pushed a commit to gaelian/enki that referenced this issue Oct 4, 2013
This JS was not written to be bundled together, but with the new Rails
asset pipeline that is exactly what happens. As a result, multiple
conflicting behaviours were being added to each form. This commit
ensures that only the desired behaviour is applied to each page.

Fixes xaviershay#50.
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