From 3a7293218a25b6e59cfd7b284953fa2604b53602 Mon Sep 17 00:00:00 2001 From: Carlos Vilhena Date: Tue, 1 May 2012 13:41:18 +0100 Subject: [PATCH] add active record generator --- .../two_factor_authentication_generator.rb | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lib/generators/active_record/two_factor_authentication_generator.rb diff --git a/lib/generators/active_record/two_factor_authentication_generator.rb b/lib/generators/active_record/two_factor_authentication_generator.rb new file mode 100644 index 0000000..0fd4289 --- /dev/null +++ b/lib/generators/active_record/two_factor_authentication_generator.rb @@ -0,0 +1,14 @@ +require 'rails/generators/active_record' + +module ActiveRecord + module Generators + class TwoFactorAuthenticationGenerator < ActiveRecord::Generators::Base + source_root File.expand_path("../templates", __FILE__) + + def copy_two_factor_authentication_migration + migration_template "migration.rb", "db/migrate/two_factor_authentication_add_to_#{table_name}" + end + + end + end +end