app/controllers/posts_controller.rb
# We don't want anybody anonymous to create new Posts.
# So in all child controllers this filter will work fine. 
We don't want anybody anonymous to create new Posts.
So in all child controllers this filter will work fine.
We don ' t want anybody anonymous to create new Posts . So in all child controllers this filter will work fine .
def update
    @post = Post.find(params[:id])
    if @post.update_attributes(params[:post])
      flash[:notice] = 'Post was successfully updated.'
      redirect_to post_path(@post)
    else
      render :action => "edit"
    end
  end
def update @post = Post . find ( params [ :id ] ) if @post . update_attributes ( params [ :post ] ) flash [ :notice ] = 'Post was successfully updated.' redirect_to post_path ( @post ) else render :action => "edit" end end
We don't want anybody anonymous to create new Posts.
We don ' t want anybody anonymous to create new Posts .
#      expire_fragment post_url(@post, :action_suffix => "tags")