Sha256: 822b6656907a8a4a14b117510f293eca084e714e801ee22ce9185236574b835b
Contents?: true
Size: 496 Bytes
Versions: 6
Compression:
Stored size: 496 Bytes
Contents
module DeviseOtp module Generators class DeviseOtpGenerator < Rails::Generators::NamedBase namespace "devise_otp" desc "Add :otp_authenticatable directive in the given model, plus accessors. Also generate migration for ActiveRecord" def inject_devise_otp_content path = File.join("app", "models", "#{file_path}.rb") inject_into_file(path, "otp_authenticatable, :", after: "devise :") if File.exist?(path) end hook_for :orm end end end
Version data entries
6 entries across 6 versions & 1 rubygems