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