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

Jjh session #799

Merged
merged 13 commits into from Dec 9, 2016
Merged

Jjh session #799

merged 13 commits into from Dec 9, 2016

Conversation

jayhardee9
Copy link
Contributor

This pull request removes sub_service_request_id and service_request_id from the session variable.
I placed a disabled hidden field named service_request_id in the application template for JS event handlers to pull from when making AJAX requests, if needed, for convenience. The base ApplicationController still sets @service_request and @sub_service_request as before.
From now on, we need to be sure to pass along (sub_)service_request_id, if the receiving controller needs it.
If you see errors like: ActiveRecord::RecordNotFound (Couldn't find ServiceRequest with 'id'=), then you should just tack on service_request_id=whatever to your AJAX request, and that should do it.

Copy link
Contributor

@jleonardw9 jleonardw9 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great.

@jayhardee9
Copy link
Contributor Author

Found some bugs in the service calendar under this branch, so I'm closing this PR while I fix them.

@jayhardee9 jayhardee9 closed this Dec 8, 2016
@jayhardee9 jayhardee9 reopened this Dec 9, 2016
@jleonardw9 jleonardw9 merged commit e00d74b into master Dec 9, 2016
@jleonardw9 jleonardw9 deleted the jjh-session branch December 9, 2016 13:28
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

Successfully merging this pull request may close these issues.

None yet

3 participants