global

def create

Redirect to the resource show page after comment creation
def create
  create! do |success, failure|
    success.html do
      redirect_back fallback_location: active_admin_root
    end
    failure.html do
      flash[:error] = I18n.t 'active_admin.comments.errors.empty_text'
      redirect_back fallback_location: active_admin_root
    end
  end
  def destroy
    destroy! do |success, failure|
      success.html do
        redirect_back fallback_location: active_admin_root
      end
      failure.html do
        redirect_back fallback_location: active_admin_root
      end
    end
  end
end