Class: DeviseSmsActivable::Generators::DeviseSmsActivableGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- DeviseSmsActivable::Generators::DeviseSmsActivableGenerator
- Defined in:
- lib/generators/devise_sms_activable/devise_sms_activable_generator.rb
Instance Method Summary collapse
-
#inject_devise_sms_activable_content ⇒ Object
def devise_generate_model invoke “devise”, [name] end.
Instance Method Details
#inject_devise_sms_activable_content ⇒ Object
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 |