Guest User

Untitled

a guest
May 25th, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. in new.html.erb, I have this code. Is this correct?
  2.  
  3. ## views
  4. <%= form_for @inquiry do |p| %>
  5. Message: <%= p.text_field 'inqmessage' %> <br />
  6. Medium (phone, email, fax): <%= p.text_field 'contactmedium' %>
  7. <br />
  8. <%= submit_tag %>
  9. <% end %>
  10.  
  11. ## error messages
  12. this is some of the error info, if it helps:
  13. compile error
  14. /Library/WebServer/rails_apps/bondimessenger/app/views/inq/new.html.erb:1: syntax error, unexpected ')'
  15. ...t(( form_for @inquiry do |p| ).to_s); _erbout.concat "\n"
  16. ^
  17. /Library/WebServer/rails_apps/bondimessenger/app/views/inq/new.html.erb:7: syntax error, unexpected kEND, expecting ')'
  18.  
  19. ##controller
  20. class InqController < ApplicationController
  21. def index
  22. @inqs = Inq.find(:all)
  23. end
  24.  
  25. def show
  26. end
  27.  
  28. def new
  29. @inq = Inq.new
  30. end
  31.  
  32. def delete
  33. end
  34.  
  35. def create
  36. @inquiry = Inq.new(params[:inquiry])
  37. @inquiry.save
  38. redirect_to inq_path
  39. end
  40. end
Add Comment
Please, Sign In to add comment