Closed marpo60 closed 5 years ago
Awesome, thanks!
@marpo60 I just tried running this on my production app and am getting errors related to overriding attributes in the view like this:
defmodule MyView do
use JaSerializer.PhoenixView
attributes([:my_attr])
def my_attr(%{my_attr: my_attr}), do: my_attr
end
produces...
function MyView.my_attr/1 is undefined or private
I haven't had a chance to dig in too much, but maybe there isn't test coverage around this or my app is doing something we're not testing. I might need to revert this if I can't figure out what's going on.
@beerlington I just tried both cases on a local branch and they are working for me. Im not able to reproduce the bug 😕
https://github.com/marpo60/ja_serializer/commit/2af4ee9a968a1e48ce4ba629d71e31ea1bb5318a
@marpo60 I dug in a little more and think I created a test that reproduces it. I want to spend a little more time with it this evening and see if it's something we're doing in our production app or not.
Fixes https://github.com/vt-elixir/ja_serializer/issues/283 Related https://github.com/vt-elixir/ja_serializer/pull/245
Benchmark before the change:
Benchmark after the change
Best!