Save error


#1

def show
@post = Post.find(params[:id])
@post.increment_count
if @post.save
render :action => ‘show’
else
flash[:notice] = ‘Error’
end
end

def increment_count
unless self.count.nil?
self.count += 1
else
self.count = 1
end
end

The count is not updated? and it is showing Error (flash notice)
Please help


#2

What’ the error message (add error_messages_for :post in your edit
form)?

Jean-Etienne
http://www.woa.hu