Skip to content

Instantly share code, notes, and snippets.

@pitosalas
Created March 2, 2011 18:22
Show Gist options
  • Save pitosalas/851410 to your computer and use it in GitHub Desktop.
Save pitosalas/851410 to your computer and use it in GitHub Desktop.
This is an example from the simple_form gem to see how gist works
class SimpleFormInstallGenerator < Rails::Generator::Base
def manifest
record do |m|
m.directory 'config/initializers'
m.template 'simple_form.rb', 'config/initializers/simple_form.rb'
m.directory 'config/locales'
m.template locale_file, 'config/locales/simple_form.en.yml'
end
end
private
def locale_file
@locale_file ||= '../../../lib/simple_form/locale/en.yml'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment