2018-01-25,27,28
rails101
错: <%= if !current_user %>
对:<% if !current_user %>
等号
错:<a herf="#" class="dropdown-toggle" data-taggle="dropdown" >
对:<a href="#" class="dropdown-toggle" data-toggle="dropdown" >
错:<% if current_user && current_user == group_user %>
对:<% if current_user && current_user == group.user %>
错:@post = Post.new(Post_params)
对:@post = Post.new(post_params)
错:<%= f.input :content, input_html: { class="form-content"} %>
对:<%= f.input :content, input_html: { class:"form-control"} %>
<% @post.each do |post| %>
<% @posts.each do |post| %>
<%= f.submit "Submit", disable_with: "Submitting...", class: "btn btn-primary" %>
<%= f.submit "Submit", disable_with: "Submiting...", class: "btn btn-primary" %>
<td><%= @post.content %></td>
<td><%= post.content %></td>
<td> <%= link_to("Edit", edit_group_post_path(post.group post), class: "btn btn-default btn-xs") %></td>
<td> <%= link_to("Edit", edit_group_post_path(post.group, post), class: "btn btn-default btn-xs") %></td>
Edit双引号和单引号一样显示。有区别吗? post.group忘记加逗号