Sha256: 7cf00797843710b882e6d5271aebe21c469f9b2a851f3922f21b5c220992d46a
Contents?: true
Size: 469 Bytes
Versions: 10
Compression:
Stored size: 469 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.exists?(path) end hook_for :orm end end end
Version data entries
10 entries across 10 versions & 3 rubygems