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