Class: Somatics::Generators::AuthenticatedControllerGenerator
- Inherits:
-
Rails::Generators::NamedBase
- Object
- Rails::Generators::NamedBase
- Somatics::Generators::AuthenticatedControllerGenerator
- Extended by:
- TemplatePath
- Defined in:
- lib/generators/somatics/authenticated_controller/authenticated_controller_generator.rb
Instance Method Summary collapse
Methods included from TemplatePath
Instance Method Details
#create_locales ⇒ Object
24 25 26 27 28 |
# File 'lib/generators/somatics/authenticated_controller/authenticated_controller_generator.rb', line 24 def create_locales [:locales].each do |locale| template "locales_#{locale}.yml", File.join('config/locales', "#{name}_sessions_#{locale}.yml") end end |
#create_login_page ⇒ Object
20 21 22 |
# File 'lib/generators/somatics/authenticated_controller/authenticated_controller_generator.rb', line 20 def create_login_page template 'login.html.erb', File.join("app/views", .namespace, "#{name}_sessions", 'new.html.erb') end |
#create_sessions_controller ⇒ Object
16 17 18 |
# File 'lib/generators/somatics/authenticated_controller/authenticated_controller_generator.rb', line 16 def create_sessions_controller template 'sessions_controller.rb', File.join('app/controllers', .namespace, "#{name}_sessions_controller.rb") end |