I have in the footer contact form - in the app is the whole contact scaffold. How to make this form working? So far, I am trying to do it this way - in the footer I render the form action:
= render 'contact_messages/new'
and in the ApplicationController I set up the before_filter:
before_filter :model_for_contact
def model_for_contact_messages
@contact_message = ContactMessage.new
end
But when I open the app, I am getting this error message in browser:
private method `new' called for ContactMessage:Class
How to solve this thing?
Thank you in advance
EDIT - contact_message.rb
class ContactMessage < ActiveRecord::Base
attr_accessible :body, :email, :name, :subject
end