Class: DevisePhone::Generators::DevisePhoneGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- DevisePhone::Generators::DevisePhoneGenerator
- Defined in:
- lib/generators/devise_phone/devise_phone_generator.rb
Instance Method Summary collapse
-
#inject_devise_phone_content ⇒ Object
def devise_generate_model invoke “devise”, [name] end.
Instance Method Details
#inject_devise_phone_content ⇒ Object
def devise_generate_model
invoke "devise", [name]
end
12 13 14 15 |
# File 'lib/generators/devise_phone/devise_phone_generator.rb', line 12 def inject_devise_phone_content path = File.join("app", "models", "#{file_path}.rb") inject_into_file(path, "phone, :", :after => "devise :") if File.exists?(path) end |