class FriendlyIdGenerator
Public Instance Methods
manifest()
click to toggle source
# File generators/friendly_id/friendly_id_generator.rb, line 3 def manifest record do |m| unless options[:skip_migration] m.migration_template('create_slugs.rb', 'db/migrate', :migration_file_name => 'create_slugs') end unless options[:skip_tasks] m.directory "lib/tasks" m.file "/../../../lib/friendly_id/active_record2/tasks/friendly_id.rake", "lib/tasks/friendly_id.rake" end end end
Protected Instance Methods
add_options!(opt)
click to toggle source
# File generators/friendly_id/friendly_id_generator.rb, line 17 def add_options!(opt) opt.separator '' opt.separator 'Options:' opt.on("--skip-migration", "Don't generate a migration for the slugs table") do |value| options[:skip_migration] = value end opt.on("--skip-tasks", "Don't add friendly_id Rake tasks to lib/tasks") do |value| options[:skip_tasks] = value end end