Skip to content

Commit

Permalink
Fix table backend's attr reader building empty associations which can…
Browse files Browse the repository at this point in the history
… prevent valid? on parent model (issue shioyama#569)
  • Loading branch information
mrbrdo committed May 4, 2022
1 parent 6c96ce3 commit 1049b23
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/mobility/backends/table.rb
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,8 @@ module Table
# @!group Backend Accessors
# @!macro backend_reader
def read(locale, **options)
translation_for(locale, **options).send(attribute)
translation = translations.in_locale(locale)
translation.send(attribute) if translation
end

# @!macro backend_writer
Expand Down

0 comments on commit 1049b23

Please sign in to comment.