Skip to content

Instantly share code, notes, and snippets.

@nomasprime
Created September 16, 2015 15:46
Show Gist options
  • Save nomasprime/4daa7b708676f48780a9 to your computer and use it in GitHub Desktop.
Save nomasprime/4daa7b708676f48780a9 to your computer and use it in GitHub Desktop.
require 'rails/generators/active_record'
module ActiveRecord
module Generators
class AdminBoundsGenerator < ActiveRecord::Generators::Base
source_root File.expand_path('../templates', __FILE__)
def copy_migration
migration_template 'migration.rb', "db/migrate/admin_bounds_create_#{table_name}.rb"
binding.pry
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment