Sha256: 6d30062d66fdad639cb3fa41ff8a210a47ee659970ce6dce3b4209603a7617e4
Contents?: true
Size: 562 Bytes
Versions: 14
Compression:
Stored size: 562 Bytes
Contents
module TwoFactorAuthenticatable module Generators class TwoFactorAuthenticationGenerator < Rails::Generators::NamedBase namespace "two_factor_authentication" desc "Adds :two_factor_authenticable directive in the given model. It also generates an active record migration." def inject_two_factor_authentication_content path = File.join("app", "models", "#{file_path}.rb") inject_into_file(path, "two_factor_authenticatable, :", :after => "devise :") if File.exists?(path) end hook_for :orm end end end
Version data entries
14 entries across 14 versions & 2 rubygems