DRY controller .valid? for create and update using simple_form
<p>So I've got these views:</p>

<p>new.html.erb</p>

<pre><code>&lt;div class="booyah-box col-xs-10 col-xs-offset-1"&gt;
&lt;h1&gt;Expose Your Hidden Gem&lt;/h1&gt;
&lt;%= simple_form_for @place do |f| %&gt;

&lt;%= f.input :name, error: "Name is mandatory" %&gt;
&lt;%= f.input :address %&gt;
&lt;%= f.input :description %&gt;
&lt;br /&gt;
&lt;%= f.submit 'Create', class: 'btn btn-primary' %&gt;
&lt;% end %&gt;
&lt;/div&gt;
</code></pre>

<p>edit.html.erb</p>

<pre><code>&lt;div class="booyah-box col-xs-10 col-xs-offset-1"&gt;
&lt;h1&gt;Edit Your Place&lt;/h1&gt;
&lt;%= simple_form_for @place do |f| %&gt;
&lt;%= f.input :name %&gt;
&lt;%= f.input :address %&gt;
&lt;%= f.input :description %&gt;
&lt;br /&gt;
&lt;%= f.submit 'Update', class: 'btn btn-primary' %&gt;
&lt;% end %&gt;
&lt;/div&gt;
</code></pre>

<p>this model:
Place.rb</p>

<pre><code>class Place &lt; ActiveRecord::Base
belongs_to :user
has_many :comments, dependent: :destroy
has_many :photos
geocoded_by :address
after_validation :geocode

validates :name, presence: true
validates :address, presence: true
validates :description, presence: true
end
</code></pre>

<p>And finally, places_controller.rb (only showing create and update)</p>

<pre><code>  def create
  @place = current_user.places.create(place_params)
  if @place.save
  redirect_to root_path
  else
  render :new
  end
  end

 def update
 @place = Place.find(params[:id])
 if @place.user != current_user
 return render text: 'Not Allowed', status: :forbidden
 end
 @place.update_attributes(place_params)
 if @place.save
  redirect_to root_path
 else
  render :edit
 end
 end
</code></pre>

<p>But, I'm trying to think DRY and want to know if there is a better way to do a validation for name address and description presence without having the same identical code in both the create and update portions of my controller? I feel like I should just be writing it once...</p>