administrate
administrate copied to clipboard
Has one translations
Fixes #2185.
The template app/views/fields/has_one/_show.html.erb
wasn't using the correct i18n key to translate the field names of the associated record.
This PR includes a heavy revamp of spec/administrate/views/fields/has_one/_show_spec.rb
, which needed some TLC in order to work with it.
The diff for lib/administrate/field/associative.rb
looks a bit misleading. The actual change is that I moved the definition of associated_class_name
to be above the private
declaration.
@pablobm, do you think you could rebase this? I merged in #1941 and I can't work out how to combine them!
@nickcharlton I think this is ready now. That was tricky! :sweat: There has to be a better way to test this stuff...
Yeah, they're pretty rough! I didn't even know where to start when I tried myself!