rails 3.2 ruby 2.15 i have complex view app/views/tickets/show.html.slim. inside view, render various sections of the ticket
one section called customer_info. here's have:
render 'tickets/sections/customer_info', locals: { customer_info: customerinfo.new, ticket: @ticket } in app/views/tickets/sections/_customer_info.html.slim, have:
= form_for(customer_info) |f| - :ticket_id = ticket.id = f.hidden_field :ticket_id .form-horizontal-column.customer-info .form-group = f.label :first_name = f.text_field :first_name .form-group = f.label :last_name = f.text_field :last_name .actions = f.submit 'save' .clear i getting following error message:
_customer_info.html.slim:2: syntax error, unexpected '=', expecting keyword_end ; :ticket_id = ticket.id; ^ i starting learn .slim. ideas?
you can't set symbol - immutable. can remove 2nd line do like:
= form_for(customer_info) |f| = f.hidden_field :ticket_id, :value => ticket.id ...