Skip to content

Commit ddfda8c

Browse files
committed
Fix table backend's attr reader building empty associations which can prevent valid? on parent model (issue shioyama#569)
1 parent 4e253a6 commit ddfda8c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/mobility/backends/table.rb

+2-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,8 @@ module Table
8585
# @!group Backend Accessors
8686
# @!macro backend_reader
8787
def read(locale, **options)
88-
translation_for(locale, **options).send(attribute)
88+
translation = translations.in_locale(locale)
89+
translation.send(attribute) if translation
8990
end
9091

9192
# @!macro backend_writer

0 commit comments

Comments
 (0)