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

User edits rebase #530

Merged
merged 20 commits into from
Nov 18, 2018
Merged

User edits rebase #530

merged 20 commits into from
Nov 18, 2018

Conversation

mi-wood
Copy link
Member

@mi-wood mi-wood commented Nov 18, 2018

Rebase to fix the tests.

mi-wood and others added 20 commits August 9, 2018 10:12
This forces the form to submit to /restrooms with POST. Normally,
simple_form_for would submit to /restrooms/:id with PATCH if the
restroom already exists, which results in invoking the update
method on restroom controller.
Add edit_id to permitted params and add it as a hidden field in the
form, which allows it to be submitted. The edit_id set in the 'new'
method only affects the value of the field in the form, and not the
edit_id for the @Restroom in the create method, since they refer
to different objects.
Redirect to the original restroom that was edited. params[:id] is nil
because the params here are the ones submitted with the form, and
there isn't an id field in the form.
It was removed in 9b1437a ("update current scope") but I think that
was an accident. We still need the script.
User edit proposals - rebased on develop
@mi-wood mi-wood merged commit 05925b3 into develop Nov 18, 2018
@mi-wood mi-wood deleted the user-edits-rebase branch November 18, 2018 18:26
@DeeDeeG
Copy link
Contributor

DeeDeeG commented Nov 18, 2018

(For the historical record: For past versions of this Pull Request, see #487 and #414.)

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