Closed drjakob closed 7 years ago
➜ story.board git:(master) ssh vicari@superkuehe.de
Enter passphrase for key '/home/robert/.ssh/id_rsa':
Last login: Mon Sep 4 21:30:15 2017 from 2a02:8108:413f:b632:4420:236:fc0c:31fc
[vicari@perseus ~]$ cd story.board/current/
[vicari@perseus current]$ bin/rails c
Loading production environment (Rails 5.0.5)
irb(main):001:0> t = SensorType.find_by(property: "Pedometer")
SensorType Load (0.6ms) SELECT "sensor_types".* FROM "sensor_types" WHERE "sensor_types"."property" = $1 ORDER BY "sensor_types"."property" ASC LIMIT $2 [["property", "Pedometer"], ["LIMIT", 1]]
=> #<SensorType id: 15, property: "Pedometer", unit: "km", created_at: "2016-06-20 21:20:27", updated_at: "2016-06-20 21:20:27", min: -0.2e2, max: 0.1e3, fractionDigits: 0>
irb(main):002:0> t.unit
=> "km"
irb(main):003:0> t.unit = "Schritte"
=> "Schritte"
irb(main):004:0> t.save
(0.2ms) BEGIN
SQL (0.8ms) UPDATE "sensor_types" SET "unit" = $1, "updated_at" = $2 WHERE "sensor_types"."id" = $3 [["unit", "Schritte"], ["updated_at", "2017-09-05 11:12:22.177186"], ["id", 15]]
(1.3ms) COMMIT
=> true
irb(main):005:0> exit
Fixed?
Reopen if necessary.
Danke! Bitte als Ganzzahl ohne Kommastelle.
=> #<SensorType id: 15, property: "Pedometer", unit: "Schritte", created_at: "2016-06-20 21:20:27", updated_at: "2017-09-05 11:12:22", min: -0.2e2, max: 0.1e3, fractionDigits: 0>
fractionDigits
is 0, so it should be displayed as integer.
No.
link?
Small Bug: Unit for Sensortype Pedometer should be "Schritte"