当用户尝试在我的网站上使用 google 进行注册时,Google 会向用户显示上述 3 个弹出窗口,但是当我尝试注册时,它不会向我显示相同的弹出窗口。我看到的就是这个——
这 3 个独立的弹出窗口导致我的网站大量流失。如何删除这 3 个不同的权限弹出窗口?
Google 登录按钮详细信息 - 使用React Google 登录
<div className="manager-signup-container">
<div className="content">Join Peoplebox as a Manager to have productive 1:1s that drive actions.</div>
<GoogleLogin
className={`google-btn-${this.state.loginbtnStatus}`}
clientId={GOOGLE_CLIENT_ID}
buttonText="Sign up with Google"
onSuccess={(response) => this.responseOauth(response, "google")}
onFailure={this.responseGoogleFail}
responseType="code"
scope="profile email https://www.googleapis.com/auth/calendar.events https://www.googleapis.com/auth/calendar.readonly"
accessType="offline"
prompt="consent"
disabled={this.state.loginDisabled}
/>
Run Code Online (Sandbox Code Playgroud) google-calendar-api google-apps google-login reactjs google-signin
我用来'active_model_serializers', '~> 0.10.6'
渲染我的 API 响应。为了我的index
行动,我正在这样做 -
render json: @items, root: 'data', each_serializer: ItemsSerializer
Run Code Online (Sandbox Code Playgroud)
但在我的回复中,我没有得到root key
-data
[
{
"id": 85,
"title": "B",
"source": "manager_added",
"shared": true,
"status": "suggested",
"item_type": "action_item",
"manager": {
"id": 2614,
"full_name": "Calvin H",
"first_name": "Calvin"
},
"reportee": {
"id": 2614,
"full_name": "Calvin H",
"first_name": "Calvin"
}
},
{
"id": 87,
"title": "D",
"source": "manager_added",
"shared": true,
"status": "suggested",
"item_type": "action_item",
"manager": {
"id": 2614,
"full_name": "Calvin H",
"first_name": "Calvin"
}, …
Run Code Online (Sandbox Code Playgroud) 在 Rails 6 应用程序中,我有以下代码。
class Reservation < ApplicationRecord
after_create :publish_creation
def publish_creation
Publishers::Reservations::CreateJob.perform_later(self)
end
end
class Publishers::Reservations::CreateJob < ApplicationJob
queue_as :default
def perform(reservation)
puts reservation.inspect #dummy code for testing
end
end
Run Code Online (Sandbox Code Playgroud)
大多数时候我创建一个Reservation
(记录总是在数据库中创建),我收到以下错误
2020-02-14T09:54:03.707Z pid=81787 tid=1xmj 警告:
ActiveJob::DeserializationError: Error while trying to deserialize arguments: Couldn't find Reservation with 'id'= 35651cf7-35bc-4da0-bb0d-6285ac093d22
Sidekiq 第一次重试处理作业时,它总能找到Reservation
并且一切正常。
Reservation id: "35651cf7-35bc-4da0-bb0d-6285ac093d22", analysis_id: "6b3b167b-1279-49c0-991a-b580c375fd0f", reservable_type: "User", reservable_id: "94f60c16-29d4-4372-983b-7544c393a7e6", reserved_between: 2020-02-10 08:00:00 UTC..2020-02-10 08:10:00 UTC, state: "scheduled", created_at: "2020-02-14 10:02:28", updated_at: "2020-02-14 10:02:28"
我在这里错过了什么吗?这是否与我在development …
"aaabbb".chars.to_a.permutation.map(&:join).uniq
Run Code Online (Sandbox Code Playgroud)
正确工作并提供所需的输出,即使用给定字符串可以形成的所有单词,但如果字符串是"cdcdcdcdeeeef"或"cdefghmnopqrstuvw"而不是"aaabbb",则相同的代码将失败.我刚试过这三个测试用例,其中三个失败.
"cdefghmnopqrstuvw".chars.to_a.permutation.map(&:join).uniq
Run Code Online (Sandbox Code Playgroud)
上面的代码行不会返回任何结果.它似乎进入了无限循环.
出了什么问题?