Class: HeimdallAuth::Generators::StandardPagesGenerator

Inherits:
Rails::Generators::Base
  • Object
show all
Defined in:
lib/generators/heimdall_auth/standard_pages/standard_pages_generator.rb

Instance Method Summary collapse

Instance Method Details

#generate_admin_pageObject



6
7
8
9
10
# File 'lib/generators/heimdall_auth/standard_pages/standard_pages_generator.rb', line 6

def generate_admin_page
  copy_file "admin_controller.rb", "app/controllers/admin_page_controller.rb"
  copy_file "admin_view.html.erb", "app/views/admin_page/index.html.erb"
  route "get '/admin' => 'admin_page#index'"
end

#generate_error_pagesObject



12
13
14
15
# File 'lib/generators/heimdall_auth/standard_pages/standard_pages_generator.rb', line 12

def generate_error_pages
  copy_file "invalid_user_data.html.erb", "app/views/application/invalid_user_data.html.erb"
  copy_file "not_enough_rights.html.erb", "app/views/application/not_enough_rights.html.erb"
end

#generate_login_pagesObject



17
18
19
# File 'lib/generators/heimdall_auth/standard_pages/standard_pages_generator.rb', line 17

def 
  copy_file "login_button.html.erb", "app/views/heimdall_auth/sessions/login_button.html.erb"
end