こんにちは、HSTORE を使用しているときに追跡できないように見える postgres 構文エラーが発生しています。
エラー:
2.0.0p247 :021 > e.save
(218.8ms) BEGIN
SQL (219.8ms) INSERT INTO "communications" ("created_at", "incoming", "properties", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id" [["created_at", Thu, 19 Sep 2013 23:49:14 EST +10:00], ["incoming", true], ["propertie
s", "{\"to\":\"First email test!\"}"], ["type", "Email"], ["updated_at", Thu, 19 Sep 2013 23:49:14 EST +10:00]]
PG::InternalError: ERROR: Syntax error near 'e' at position 13
: INSERT INTO "communications" ("created_at", "incoming", "properties", "type", "updated_at") VALUES ($1, $2, $3, $4, $5) RETURNING "id"
(218.4ms) ROLLBACK
このエラーは、メール レコードを保存しようとしたときの Rails コンソールからのもので、アプリのメールは Communication モデルから継承され、レコードはデータベースの「communications」テーブルに保存されます。
モデル:
class Communication < ActiveRecord::Base
belongs_to :patient
belongs_to :practice
end
と...
class Email < Communication
store_accessor :properties, :to, :cc, :bcc, :message, :subject
end