Skip to content

Commit

Permalink
fix: set on_update for the settings properly (#5)
Browse files Browse the repository at this point in the history
  • Loading branch information
fahchen authored Apr 18, 2024
1 parent 8d3a311 commit 9cbc79d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lib/form_metal/fields/checkbox_field.ex
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ defmodule FormMetal.Fields.CheckboxField do
embedded_schema do
Module.eval_quoted(__MODULE__, unquote(block))

embeds_one :settings, Settings, primary_key: false do
embeds_one :settings, Settings, primary_key: false, on_replace: :update do
field :options, {:array, :string}
end
end
Expand Down
2 changes: 1 addition & 1 deletion lib/form_metal/fields/radio_button_field.ex
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ defmodule FormMetal.Fields.RadioButtonField do
embedded_schema do
Module.eval_quoted(__MODULE__, unquote(block))

embeds_one :settings, Settings, primary_key: false do
embeds_one :settings, Settings, primary_key: false, on_replace: :update do
field :options, {:array, :string}
end
end
Expand Down

0 comments on commit 9cbc79d

Please sign in to comment.