Skip to content

Instantly share code, notes, and snippets.

@kristiankristensen
Created October 20, 2011 17:25
Show Gist options
  • Save kristiankristensen/1301723 to your computer and use it in GitHub Desktop.
Save kristiankristensen/1301723 to your computer and use it in GitHub Desktop.
Rails generators and initializers
require 'tweethook'
TweetHook::Config.track_keywords = Array['bieber']
require 'rails/generators'
require 'tweethook'
class TweethookGenerator < Rails::Generators::Base
self.source_paths << File.join(File.dirname(__FILE__), 'templates')
def create_initializer
template 'initializer', 'config/initializers/tweethook.rb'
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment