PRoblem with converting form_tag in rails
- by Gigg
I am new to ruby and rails and I am having a problem from Beggining Ruby on Rails Ecommerce. (Yes, its an old book).
I have these 2 code sets for a view:
new.html.erb:
<%= form_tag :action= 'create' do -%
<%= render :partial = 'form' %
<%= submit_tag 'Create' %
<%= end -%
<% link_to 'Back', :action = 'index' %
_form.html.erb:
<% error_messages_for 'supplier' %
First Name
Last Name
But It wont show although I added the do option. It keeps giving me this error:
C:/rails/emporium/app/views/admin/supplier/new.html.erb:1: syntax error, unexpected ')'
...orm_tag :action= 'create' do ).to_s)
... ^
C:/rails/emporium/app/views/admin/supplier/new.html.erb:4: syntax error, unexpected keyword_end
; @output_buffer.concat(( end ).to_s)
^
C:/rails/emporium/app/views/admin/supplier/new.html.erb:5: syntax error, unexpected tIVAR, expecting ')'
@output_buffer.concat "\n"
^
C:/rails/emporium/app/views/admin/supplier/new.html.erb:7: syntax error, unexpected keyword_ensure, expecting keyword_end
C:/rails/emporium/app/views/admin/supplier/new.html.erb:9: syntax error, unexpected $end, expecting ')'
Can anyone suggest how I fix this since I have not fould a google answer yet.
Thanks
Gigg