-
Notifications
You must be signed in to change notification settings - Fork 85
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
Guides 2.1: Add documentation for FormHelper #221
Conversation
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.
@swilgosz Thanks for this huge effort. 🙏
Please:
- Remove unneeded sections
- Accept inline comments, where it makes sense. Newline suggestions after H3 titles are for Markdown rendering reasons.
- Change
ruby
toerb
in the examples
content/v2.1/helpers/form_helper.md
Outdated
**Basic Example** | ||
|
||
```ruby | ||
<%= form_for("book", "/books", class: "form-horizontal") do |f| %> |
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.
@swilgosz It's time to use routing helpers 😉 .
content/v2.1/helpers/form_helper.md
Outdated
|
||
As you can see, all the fields had been prefixed with the form's name, which is a string `book`, passed as a first argument. | ||
|
||
To show CSRF meta tags, you need to have [sessions enabled](/v2.0/actions/sessions). Without that, you won't have the `csrf_token` hidden input field available. |
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.
To show CSRF meta tags, you need to have [sessions enabled](/v2.0/actions/sessions). Without that, you won't have the `csrf_token` hidden input field available. |
@swilgosz This is out of context.
You wrote a section that explains CSRF protection, maybe let's move it there.
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.
I disagree. Because we have sessions disabled by default, but our examples assume it's enabled, I think it makes sense to mention the chapter when it's explained how to enable sessions. I've just removed the CSRF explanation, but kept the link
Co-authored-by: Luca Guidi <[email protected]>
Co-authored-by: Luca Guidi <[email protected]>
Co-authored-by: Luca Guidi <[email protected]>
Co-authored-by: Luca Guidi <[email protected]>
Co-authored-by: Luca Guidi <[email protected]>
ba08159
to
0eed627
Compare
@jodosha ready for another round of review, but |
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.
@swilgosz Thank you very much for working on my previous suggestions. 🙏
We do not have a syntax highlighting for ERB snippets.
Merging as the code had been approved. |
Resolves: #201