Skip to content

Instantly share code, notes, and snippets.

@bhh
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhh/9936e7a5558527b9efaf to your computer and use it in GitHub Desktop.
Save bhh/9936e7a5558527b9efaf to your computer and use it in GitHub Desktop.
de:
flash:
actions:
create:
neuter: asdfasdfasdf
male: a
female: b
module GenderHelper
def flash_action(action, resource)
gender = I18n.t(resource.name.downcase, scope: 'gender')
I18n.t(gender, resource_name: resource.class.model_name.human, scope: [:flash, :actions, action])
end
end
flash_action(:create, User)
de:
gender:
project: :neuter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment