Skip to content

Instantly share code, notes, and snippets.

@bogn
Created March 10, 2014 15:57
Show Gist options
  • Save bogn/9467807 to your computer and use it in GitHub Desktop.
Save bogn/9467807 to your computer and use it in GitHub Desktop.
short inject statement
def self.fully_approved_query_value
MultiTenancy.current_version.locales.inject({}) do |result, locale|
result.merge(locale.to_s => true)
end
end
@bogn
Copy link
Author

bogn commented Mar 10, 2014

Exemplary result:
{de: true, en: true, fr: true}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment