Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- in new.html.erb, I have this code. Is this correct?
- ## views
- <%= form_for @inquiry do |p| %>
- Message: <%= p.text_field 'inqmessage' %> <br />
- Medium (phone, email, fax): <%= p.text_field 'contactmedium' %>
- <br />
- <%= submit_tag %>
- <% end %>
- ## error messages
- this is some of the error info, if it helps:
- compile error
- /Library/WebServer/rails_apps/bondimessenger/app/views/inq/new.html.erb:1: syntax error, unexpected ')'
- ...t(( form_for @inquiry do |p| ).to_s); _erbout.concat "\n"
- ^
- /Library/WebServer/rails_apps/bondimessenger/app/views/inq/new.html.erb:7: syntax error, unexpected kEND, expecting ')'
- ##controller
- class InqController < ApplicationController
- def index
- @inqs = Inq.find(:all)
- end
- def show
- end
- def new
- @inq = Inq.new
- end
- def delete
- end
- def create
- @inquiry = Inq.new(params[:inquiry])
- @inquiry.save
- redirect_to inq_path
- end
- end
Add Comment
Please, Sign In to add comment