Skip to content

Instantly share code, notes, and snippets.

@parndt
Forked from tpendragon/gist:4505845
Last active December 10, 2015 22:58
Show Gist options
  • Save parndt/4505891 to your computer and use it in GitHub Desktop.
Save parndt/4505891 to your computer and use it in GitHub Desktop.
def content_with_parent_fallback
content_without_parent_fallback.presence || translation_for(parent_translation(I18n.locale)).try(:content)
end
alias_method_chain :content, :parent_fallback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment