Q:

Contact form showing blank

I am not sure what I did, but my contact form fields are not showing on the page. I am following railscast 219. I changed the original line <%= form_for @message do |f| %> to <%= form_for Message.new do |f| %> since I was getting undefined methods for the fields.
new.html.erb:
<%= form_for Message.new do |f| %>
  <p>
    <%= f.label :email %><br />
    <%= f.text_field :email %>
  </p>
  <p>
    <%= f.label :content, "Message" %><br />
    <%= f.text_area :content %>
  </p>
  <p><%= f.submit "Send Message" %></p>
<% end %>

Contacts controller:
  def new
      @message = Message.new
    end

    def create
      @message = Message.new(params[:message])
      if @message.valid?
        # TODO send message here
        flash[:notice] = "Message sent! Thank you for contacting us."
        redirect_to root_url
      else
        render :action => 'new'
      end
    end
  end

Contact model:
   include ActiveModel::Validations
    include ActiveModel::Conversion
    extend ActiveModel::Naming

    attr_accessor :email, :content

    validates_length_of :content, :maximum => 500

    def initialize(attributes = {})
      attributes.each do |name, value|
        send("#{name}=", value)
      end
    end

    def persisted?
      false
    end
  end

A:

Your variables are pointing to a Messages model and you only included a Contacts model. Either change the variables or create the new Messages model.

