-
Notifications
You must be signed in to change notification settings - Fork 21.6k
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
Code example typos in Getting Started with Rails tutorial #11467
Comments
Looking into this. |
@arunagw I was searching already... ping me on the PR if you find something 😄 |
@senny sure. thanks |
A PR is here for 1st case : #11473 For second I found it correct in code. I think it's some problem with generation. <%= form_for :post, url: post_path(@post.id), method: :patch do |f| %>
<% if @post.errors.any? %>
<div id="error_explanation">
<h2><%= pluralize(@post.errors.count, "error") %> prohibited
this post from being saved:</h2>
<ul>
<% @post.errors.full_messages.each do |msg| %>
<li><%= msg %></li>
<% end %>
</ul>
</div>
<% end %>
<p>
<%= f.label :title %><br>
<%= f.text_field :title %>
</p>
<p>
<%= f.label :text %><br>
<%= f.text_area :text %>
</p>
<p>
<%= f.submit %>
</p>
<% end %> |
For master i have pushed here https://github.com/rails/docrails/commit/fd8890058e22a95642b14f3efcb32396bcf90a5e |
Both are fixed already |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
http://guides.rubyonrails.org/getting_started.html
5.12 index.html.erb code example
throws an error
works ok
5.12 edit.html.erb code example:
<%= form_for :post, url: post_path(@post.id) },
Throws an error. Should be
<%= form_for :post, url: post_path(@post.id),
The text was updated successfully, but these errors were encountered: