This repository has been archived by the owner on Jun 27, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 140
Update comment from /mentors/applications/:id page #973
Closed
stlireri
wants to merge
1
commit into
rails-girls-summer-of-code:master
from
stlireri:feature/update-mentor-comments
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
hr(id="#{dom_id comment}") | ||
= simple_form_for comment, url: mentors_comments_path do |f| | ||
= simple_form_for comment, :url => comment.new_record? ? url_for(action: 'create', controller: 'mentors/comments') :url_for(action: 'update', controller: 'mentors/comments') do |f| | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does the following work? = simple_form_for [:mentors, comment] do |f| |
||
.form-inputs.clearfix | ||
= f.input :commentable_id, as: :hidden, value: comment.commentable_id | ||
= f.input :id, as: :hidden, value: comment.id | ||
= f.input :text, as: :text, label: 'My Comment', input_html: { rows: 5 }, hint: 'This is a place for you to take notes for yourself about this application. Your comment is only visible to yourself as well as the selection committee and you can update and remove it as you like.' | ||
.form-actions | ||
= f.button :submit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this potentially allows to edit other user's comments (it shouldn't in this case, since we fetch the comments scoped by commenter in
mentor_comments
) I would like to have a test that catches a regression: can you add a test example where the a user attempts to update some other user's mentor comment please?