Class: DeviseOmniauth::Generators::InstallGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- DeviseOmniauth::Generators::InstallGenerator
- Defined in:
- lib/generators/devise_omniauth/install_generator.rb
Instance Method Summary collapse
-
#add_devise_routes ⇒ Object
TODO should be able to customize the :as option (also will have to change in views).
-
#copy_initializer ⇒ Object
TODO the source should come from devise and not duplicated in this gem.
-
#copy_locale ⇒ Object
TODO the source should come from devise and not duplicated in this gem.
-
#copy_views ⇒ Object
TODO is there a way for these to come from devise even with the changes?.
- #show_readme ⇒ Object
Instance Method Details
#add_devise_routes ⇒ Object
TODO should be able to customize the :as option (also will have to change in views)
25 26 27 28 |
# File 'lib/generators/devise_omniauth/install_generator.rb', line 25 def add_devise_routes devise_route = "mount DeviseOmniauth::Engine => '/', :as => 'devise_omniauth'" route devise_route end |
#copy_initializer ⇒ Object
TODO the source should come from devise and not duplicated in this gem
15 16 17 |
# File 'lib/generators/devise_omniauth/install_generator.rb', line 15 def copy_initializer template "config/initializers/devise.rb", "config/initializers/devise.rb" end |
#copy_locale ⇒ Object
TODO the source should come from devise and not duplicated in this gem
20 21 22 |
# File 'lib/generators/devise_omniauth/install_generator.rb', line 20 def copy_locale copy_file "config/locales/en.yml", "config/locales/devise.en.yml" end |
#copy_views ⇒ Object
TODO is there a way for these to come from devise even with the changes?
10 11 12 |
# File 'lib/generators/devise_omniauth/install_generator.rb', line 10 def copy_views directory 'views/devise/', 'app/views/devise' end |
#show_readme ⇒ Object
30 31 32 |
# File 'lib/generators/devise_omniauth/install_generator.rb', line 30 def show_readme readme "README" if behavior == :invoke end |