app / views / users / _form.html.haml,第10行
= form_for @user do |f|
- if @user.errors.any?
#error_explanation
%h2= "#{pluralize(@user.errors.count, "error")} prohibido que este usuario se guarde:"
%ul
- @user.errors.full_messages.each do |msg|
%li= msg
.field
= f.label 'Usuario'
= f.text_field :username
.field
= f.label :email
= f.text_field :email
.field
= f.label 'Teléfono'
= f.phone_field :phone
.field
= f.label 'Contraseña'
= f.password_field :password
.field
= f.label 'Reingresar Contraseña'
= f.password_field :password_confirmation
.control-group
//= f.label 'Permisos'
%ul.unstyled
- for role in Role.find(:all)
%li
= check_box_tag "user[role_ids][]", role.name, @user.roles.include?(role)
= role.name
%br
.actions
= f.submit 'Guardar',:class => 'btn btn-primary'
错误似乎出现在= f.label
我删除了所有= f.label
并且没有抛出任何错误,= f.label 'Usuario'
也更改了= f.label :username
而没有运气。
错误讯息:
ArgumentError in Users#new
Showing C:/Sites/AutosCostaRica/app/views/users/_form.html.haml where line #10 raised:
syntax error in "<reader>", line 3, column 18:
next_label: >>
^
更新
我刚刚发现它在Ruby 1.8上运行得很完美,但我已经减少了1.9。
有什么想法吗?