title: Why is my rails simple validation not working
body: <p>I have a very basic rails app. I am playing around with validation. </p>
  
  <p>Controller</p>
  
  <pre><code>class PagesController &lt; ApplicationController
    def new
      @user = User.new
    end
    def edit
      @user = User.new(:state =&gt; params[:state], :country =&gt; params[:country])
      @user.save
    end
  end
  </code></pre>
  
  <p>Model</p>
  
  <pre><code>class User &lt; ActiveRecord::Base
      validates_presence_of :country
      validates_presence_of :state
  end
  </code></pre>
  
  <p>Views/pages/edit.html.erb</p>
  
  <pre><code>&lt;% form_for :user, @user, :url =&gt; { :action =&gt; "edit" } do |f| %&gt;
    &lt;%= f.text_field :country %&gt;
    &lt;%= f.text_field :state %&gt;
    &lt;%= submit_tag 'Create' %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>All I want to do is click Create when I have not entered anything and then have a validation come up and list the required fields.  I've read some tutorials and they make it so simple. Why can't I get this to work? what am i doing wrong? When i create a scaffold then it works ok but that generates a scaffold.css in public/stylesheets.  W/out scaffold right now i have no stylesheet in the public folder. </p>