Sha256: bc7dda5eca5617a762f2ed7652f52eca6dc8b06a655afd233d758521b09c0c06
Contents?: true
Size: 554 Bytes
Versions: 52
Compression:
Stored size: 554 Bytes
Contents
module Para class AdminUserGenerator < Rails::Generators::Base source_root File.expand_path("../templates", __FILE__) def create_admin_user say 'Creating default admin...' email = ask('Email [admin@example.com] : ').presence || 'admin@example.com' password = ask('Password [password] : ', echo: false).presence || 'password' print "\n" # echo: false doesn't print a newline so we manually add it AdminUser.create! email: email, password: password say 'Created AdminUser' end end end
Version data entries
52 entries across 52 versions & 1 rubygems