hummingbird-me / kitsu-tools

:hammer: The tools we use to build Kitsu, the coolest platform for anime and manga
https://kitsu.app
Apache License 2.0
2.09k stars 265 forks source link

Generalize Titleable concern #745

Closed NuckChorris closed 6 years ago

NuckChorris commented 8 years ago

We want to reuse the Titleable concern for other fields (synopsis, etc.), so we should extract the localizable field into something we can apply across the site on other fields.

Probably something like the following syntax would be nice (in a concern mixed into BaseRecord, obviously):

class Anime < BaseRecord
  localized_field :synopsis, default_lang: 'en_us'
end