Sha256: 918297dcf5843a5534974eecf9de821df89cd9ea5f25506a5ea9c097d86e8afd
Contents?: true
Size: 483 Bytes
Versions: 4
Compression:
Stored size: 483 Bytes
Contents
module DeviseInvitable module Generators class DeviseInvitableGenerator < Rails::Generators::NamedBase namespace 'devise_invitable' desc 'Add :invitable directive in the given model. Also generate migration for ActiveRecord' def inject_devise_invitable_content path = File.join('app', 'models', "#{file_path}.rb") inject_into_file(path, 'invitable, :', after: 'devise :') if File.exist?(path) end hook_for :orm end end end
Version data entries
4 entries across 4 versions & 2 rubygems