require '/myapp/config/boot'
require '/myapp/config/application'
Rails.application.require_environment!
Article.count
pp Article.hellos
[#<Article:0x0000564563e25a78
id: 4,
title: "hello",
body: nil,
created_at: Thu, 11 Mar 2021 16:26:34.723309000 UTC +00:00,
updated_at: Thu, 11 Mar 2021 16:26:34.723309000 UTC +00:00,
read_count: 5342>,
#<Article:0x0000564563e25960
id: 6,
title: "hello",
body: nil,
created_at: Thu, 11 Mar 2021 17:17:44.672528000 UTC +00:00,
updated_at: Thu, 11 Mar 2021 17:23:07.917332000 UTC +00:00,
read_count: 4323>,
#<Article:0x0000564563e25820
id: 1,
title: "hello",
body: nil,
created_at: Thu, 11 Mar 2021 16:00:15.282215000 UTC +00:00,
updated_at: Thu, 11 Mar 2021 17:23:15.226234000 UTC +00:00,
read_count: 1233>]
Rover::DataFrame.new(Article.all)
Vega.lite.data(Rover::DataFrame.new(Article.all))
.mark(type: "bar", tooltip: true)
.encoding(
x: {field: "id", type: "nominal"},
y: {field: "read_count", type: "quantitative"}
)