Class: DeviseSmsActivable::Generators::DeviseSmsActivableGenerator

Inherits:
Rails::Generators::NamedBase
  • Object
show all
Defined in:
lib/generators/devise_sms_activable/devise_sms_activable_generator.rb

Instance Method Summary collapse

Instance Method Details

#inject_devise_sms_activable_contentObject

def devise_generate_model

invoke "devise", [name]

end



12
13
14
15
# File 'lib/generators/devise_sms_activable/devise_sms_activable_generator.rb', line 12

def inject_devise_sms_activable_content
  path = File.join("app", "models", "#{file_path}.rb")
  inject_into_file(path, "sms_activable, :", :after => "devise :") if File.exists?(path)
end