Hi, 
I'm trying a simple to implement defprotocol/defimpl but I recevei always a 
error:
ps.: Activity is a Ector module, I using phoenix

defprotocol D4.Policy do
  def scoped(a, query, conn)
end

defimpl D4.Policy, for: D4.Activity do
  def scoped(a, query, conn) do
    IO.puts "hi"
  end
end

D4.Policy.scoped(D4.Activity, 1, 2)

error -->

** (Protocol.UndefinedError) protocol D4.Policy not implemented for 
D4.Activity

    (d4) web/lib/policy.ex:1: D4.Policy.impl_for!/1

    (d4) web/lib/policy.ex:3: D4.Policy.scoped/3

-- 
You received this message because you are subscribed to the Google Groups 
"elixir-lang-core" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elixir-lang-core/a91fdd5e-9d56-476b-b10f-4322f4150148%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to