Sha256: 7f1c3be9b45cdb7025d0a3142a9f2a359bc0517521bdd1cee35bfce5773dffc7
Contents?: true
Size: 646 Bytes
Versions: 8
Compression:
Stored size: 646 Bytes
Contents
module Auther class InstallGenerator < ::Rails::Generators::Base source_root File.join(File.dirname(__FILE__), "..", "templates") desc "Installs Auther settings and routes." def install install_initializer add_routes end private def install_initializer template File.join("config", "initializers", "auther.rb"), File.join("config", "initializers", "auther.rb") end def add_routes route %(delete "/logout", to: "auther/session#destroy", as: "logout") route %(get "/login", to: "auther/session#new", as: "login") route %(mount Auther::Engine => "/auther") end end end
Version data entries
8 entries across 8 versions & 1 rubygems