ex_admin
ex_admin copied to clipboard
embed model issue
Working with the latest hex
release:
schema "events" do
embeds_many :partners, MyApp.Partner
end
defmodule MyApp.Partner do
use Ecto.Schema
embedded_schema do
field :url
field :image
timestamps
end
end
And the default admin form, results in:
Protocol.UndefinedError at GET /admin/events/new protocol String.Chars not implemented for {:embed, %Ecto.Embedded{cardinality: :many, field: :partners, on_cast: :changeset, on_replace: :raise, owner: MyApp.Event, related: MyApp.Partner, strategy: :replace}}
We don’t yet support embedded_schema.
On Aug 18, 2016, at 9:56 AM, Sobolev Nikita [email protected] wrote:
Working with the latest hex release:
schema "events" do embeds_many :partners, MyApp.Partner end
defmodule MyApp.Partner do use Ecto.Schema
embedded_schema do field :url field :image
timestamps
end end And the default admin form, results in:
Protocol.UndefinedError at GET /admin/events/new protocol String.Chars not implemented for {:embed, %Ecto.Embedded{cardinality: :many, field: :partners, on_cast: :changeset, on_replace: :raise, owner: MyApp.Event, related: MyApp.Partner, strategy: :replace}}
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/smpallen99/ex_admin/issues/197, or mute the thread https://github.com/notifications/unsubscribe-auth/AA2YpbaN98dLUDlVLJHQhF_9GgCTsT1nks5qhGR6gaJpZM4Jng6c.
It seems works now with https://github.com/smpallen99/ex_admin/commit/115ea72622828d1bff40028a22c49cd032e8fdc1