title: Ruby on Rails check box not updating on form submission
body: <p>I have an entries controller that allows users to add contact information the website. The user-submitted information isn't visible to users until the administrator checks a check box and submits the form. So basically my problem is that if I check the check box as an administrator while initially creating an entry (entries#new) the entry will be publicly visible as expected, but if a non-admin user creates an entry (the normal user view doesn't include the 'live' check box, only the admin one does) then that entry is stuck in limbo because the entries#edit view for some reason doesn't update the boolean check box value when logged in as an admin. </p>
  
  <p>entries#new view:</p>
  
  <pre><code>&lt;% form_for(@entry) do |f| %&gt;
    &lt;%= f.error_messages %&gt;
    Name&lt;br /&gt;
    &lt;%= f.text_field :name %&gt;
  
    Mailing Address&lt;br /&gt;
    &lt;%= f.text_field :address %&gt;
  
    #...
    &lt;%- if current_user -%&gt;
      &lt;%= f.label :live %&gt;&lt;br /&gt;
      &lt;%= f.check_box :live %&gt;
    &lt;%- end -%&gt;
    &lt;%= f.submit 'Create' %&gt;
  &lt;% end %&gt;
  </code></pre>
  
  <p>entries#edit (only accessible by admin) view:</p>
  
  <pre><code>&lt;% form_for(@entry) do |f| %&gt;
    &lt;%= f.error_messages %&gt;
  
    &lt;%= f.label :name %&gt;&lt;br /&gt;
    &lt;%= f.text_field :name %&gt;
  
    Mailing Address&lt;br /&gt;
    &lt;%= f.text_field :address %&gt;
  
    &lt;%= f.label :live %&gt;&lt;br /&gt;
    &lt;%= f.check_box :live %&gt;
  
    &lt;%= f.submit 'Update' %&gt;
  
  &lt;% end %&gt;
  </code></pre>
  
  <p>EDIT: </p>
  
  <p>entries_controller.rb update method:</p>
  
  <pre><code>def update
    @entry = Entry.find(params[:id])
    respond_to do |format|
      if @entry.update_attributes(params[:entry])
        flash[:notice] = 'Entry was updated.'
        format.html { redirect_to(@entry) }
      else
        format.html { render :action =&gt; "edit" }
      end
    end
  end
  </code></pre>
  
  <p>entry.rb:</p>
  
  <pre><code>class Entry &lt; ActiveRecord::Base
    acts_as_mappable
    acts_as_taggable_on   :tags
    validates_presence_of :name, :tag_list
    validates_length_of   :name, :maximum =&gt; 64
    validates_length_of   :tag_list, :maximum =&gt; 128, :allow_blank =&gt; false
    validates_length_of   :paddress, :maximum =&gt; 128, :allow_blank =&gt; true
    validates_length_of   :address, :maximum =&gt; 128, :allow_blank =&gt; true
    validates_length_of   :tollfreephone, :in =&gt; 7..32, :allow_blank =&gt; true
    validates_length_of   :phone, :in =&gt; 7..32, :allow_blank =&gt; true
    validates_length_of   :phone2, :in =&gt; 7..32, :allow_blank =&gt; true
    validates_length_of   :mobile, :in =&gt; 7..32, :allow_blank =&gt; true
    validates_length_of   :fax, :in =&gt; 7..32, :allow_blank =&gt; true
    validates_length_of   :email, :in =&gt; 7..48, :allow_blank =&gt; true
    validates_format_of   :email,
                      :with =&gt; /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\Z/i,
                      :on =&gt; :create, :allow_blank =&gt; true
  
    validates_length_of   :website, :maximum =&gt; 64, :allow_blank =&gt; true
    validates_length_of   :description, :maximum =&gt; 1024, :allow_blank =&gt; true
    attr_accessible       :name, :tag_list, :paddress, :address, :tollfreephone,
                          :phone, :phone2, :mobile, :fax, :email, :website,
                          :description 
    validate              :required_info
    before_save           :geocode_paddress
    searchable_on         :name, :address, :phone, :phone2, :mobile, :fax, :email,
                      :website, :category, :description
  private
    def required_info
      if( phone.empty?  and phone2.empty? and tollfreephone.empty? and 
          mobile.empty? and fax.empty?    and email.empty?         and 
          website.empty? 
        ) 
        errors.add_to_base "Please have at least one form of contact information."
      end
    end
    def geocode_paddress
      # if paddress is nil or empty set the old values to nil and return    
      ((self.lat = self.lng = nil); return true) if paddress.empty?
      g=Geokit::Geocoders::MultiGeocoder.geocode(paddress)
      (errors.add(:paddress,"Could not Geocode address");
         return false) unless g.success
      self.lat, self.lng = g.lat, g.lng
    end
  end
  </code></pre>
  
  <p>Any ideas as to why an administrator can't update the :live check box from the edit view? </p>
  
  <p>I would greatly appreciate any suggestions. I'm new to rails. I can post more code if it's needed. Thanks for reading my question.</p>