2018-01-19 rails101

app/helpers/flashes_helper.rb
错:FLASS_CLASSES.fetch key.to_sym, key
对:FLASH_CLASSES.fetch key.to_sym, key

app/controllers/welcome_controller.rb
错:flash[:nitice] = "早安!你好!"
对:flash[:notice] = "早安!你好!"

app/views/groups/index.html.erb
错:<%= link_to("New group", new_group_path, class="btn btn-primary pull-right") %>
对:<%= link_to("New group", new_group_path, class:"btn btn-primary pull-right") %>

错:<% link_to("Edit", edit_group_path(group), class: "btn btn-sm btn-default")%>
对:<%= link_to("Edit", edit_group_path(group), class: "btn btn-sm btn-default")%>

错:<%= link_to("Delete", group_path(group), class: "btn btn-sm btn-default",mothod: :delete, data: { confirm: "Are you sure?" }) %>
对:<%= link_to("Delete", group_path(group), class: "btn btn-sm btn-default",method: :delete, data: { confirm: "Are you sure?" }) %>
这个一直做到下面的delete,不对,才回来找。幸好找到了。
庆幸。

你可能感兴趣的:(2018-01-19 rails101)