Class: Integral::Generators::ViewsGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Integral::Generators::ViewsGenerator
- Defined in:
- lib/generators/integral/views_generator.rb
Overview
Generates a copy of Integral views
Instance Method Summary collapse
-
#copy_backend_views ⇒ Object
Copies over backend views.
-
#copy_devise_views ⇒ Object
Copies over devise views.
-
#copy_frontend_views ⇒ Object
Copies over frontend views.
-
#copy_mailer_views ⇒ Object
Copies over mailer views.
Instance Method Details
#copy_backend_views ⇒ Object
Copies over backend views
14 15 16 17 18 19 20 |
# File 'lib/generators/integral/views_generator.rb', line 14 def copy_backend_views return unless ['views'].include?('backend') directory 'integral/backend' directory 'layouts/integral/backend' file 'layouts/integral/backend.html.haml' end |
#copy_devise_views ⇒ Object
Copies over devise views
44 45 46 47 48 49 |
# File 'lib/generators/integral/views_generator.rb', line 44 def copy_devise_views return unless ['views'].include?('devise') directory 'devise' file 'layouts/integral/login.haml' end |
#copy_frontend_views ⇒ Object
Copies over frontend views
23 24 25 26 27 28 29 30 31 32 |
# File 'lib/generators/integral/views_generator.rb', line 23 def copy_frontend_views return unless ['views'].include?('frontend') directory 'integral/pages' directory 'integral/posts' directory 'integral/tags' directory 'integral/shared' directory 'layouts/integral/frontend' file 'layouts/integral/frontend.html.haml' end |
#copy_mailer_views ⇒ Object
Copies over mailer views
35 36 37 38 39 40 41 |
# File 'lib/generators/integral/views_generator.rb', line 35 def copy_mailer_views return unless ['views'].include?('mailer') directory 'integral/contact_mailer' directory 'layouts/integral/mailer' file 'layouts/integral/mailer.html.inky-haml' end |