Got an undefined variable "interest_rate" error in the example of the "Define Polymorphic Relationships" document

In the last command line test of Define Polymorphic Relationships
BankAccount |> Ash.Query.filter(interest_rate > 0.01) |> Ash.read!()
Now we got an error, but it worked weeks ago

iex(1)> BankAccount |> Ash.Query.filter(interest_rate > 0.01) |> Ash.read!()
error: undefined variable "interest_rate"
└─ iex:1

** (CompileError) cannot compile code (errors have been logged)

iex(1)>

I put the code in https://github.com/iyjim/toy_bank.git for reference.

Please help!

you must first require Ash.Query to use Ash.Query.filter

1 Like

Ahh, made this mistake again, must note it down. Thanks a lot!