# 제안: ActiveModelSerializers에서 Alba로 마이그레이션

**URL:** <https://meta.discourse.org/t/suggestion-migrating-from-activemodelserializers-to-alba/233266>\
**Category:** Development\
**Created:** [7월 19, 2022, 8:21오전 UTC](https://meta.discourse.org/t/suggestion-migrating-from-activemodelserializers-to-alba/233266 "2022-07-19T08:21:06Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![okuramasafumi](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/okuramasafumi/32/267513_2.png) [@okuramasafumi](https://meta.discourse.org/u/okuramasafumi)\
**Post date:** [8월 18, 2022, 3:25오후 UTC](https://meta.discourse.org/t/suggestion-migrating-from-activemodelserializers-to-alba/233266/4 "2022-08-18T15:25:03Z")

</div>

늦게 답변드려 죄송합니다.

성능이 개선될 것 같아 벤치마크 스크립트를 실행해 보겠습니다.

시리얼라이저 플러그인에 대해서는 몰랐습니다. 시리얼라이저를 커스터마이즈하는 플러그인의 예시를 하나 찾았습니다.

> <https://github.com/discourse/discourse/blob/e49167b311db1ef6f18c7bfdaf44a552802592d9/plugins/poll/app/serializers/poll_option_serializer.rb#L15-L17>

여기서 `include_votes?` 메서드는 코드베이스에서 어디에 사용되는지 찾을 수 없어 AMS의 매직 메서드인 것 같습니다. Alba는 이러한 동작을 지원하지 않으므로 이러한 경우 마이그레이션이 필요할 것 같습니다.

호환성 유지는 매우 중요하므로, Alba가 기존 플러그인과 호환되도록 만들 수 없다면 진행을 포기하는 쪽을 선호합니다.

---

_[View the full topic](https://meta.discourse.org/t/suggestion-migrating-from-activemodelserializers-to-alba/233266)._
