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