class ExceptionHunter::InstallGenerator
Public Instance Methods
copy_initializer()
click to toggle source
# File lib/generators/exception_hunter/install/install_generator.rb, line 10 def copy_initializer @underscored_user_name = name.underscore.gsub('/', '_') @use_authentication_method = options[:users].present? template 'exception_hunter.rb.erb', 'config/initializers/exception_hunter.rb' end
create_migrations()
click to toggle source
# File lib/generators/exception_hunter/install/install_generator.rb, line 26 def create_migrations migration_template 'create_exception_hunter_error_groups.rb.erb', 'db/migrate/create_exception_hunter_error_groups.rb' migration_template 'create_exception_hunter_errors.rb.erb', 'db/migrate/create_exception_hunter_errors.rb' end
setup_routes()
click to toggle source
# File lib/generators/exception_hunter/install/install_generator.rb, line 16 def setup_routes if options[:users] gsub_file 'config/routes.rb', "\n devise_for :#{plural_table_name}, skip: :all", "\n ExceptionHunter.routes(self)" else route 'ExceptionHunter.routes(self)' end end