Sha256: e787508996dc4c5c8a2c94304ca179ec5feca8ac233a29e99267001a4a5e848b
Contents?: true
Size: 578 Bytes
Versions: 7
Compression:
Stored size: 578 Bytes
Contents
# Load associated Rails environment if there is a Rails environment # require 'exposition/engine' if defined? ::Rails require 'thor' module Exposition class Setup < Thor desc 'create_user', 'creates an admin user' method_option :attributes, type: :hash, required: true, desc: 'specifies attributes for your user account. eg. name:Johnny email:john@exposition.com password:secret password_confirmation:secret' def create_user user_attributes = options.fetch('attributes') ::Exposition::User.create!(user_attributes) end end end
Version data entries
7 entries across 7 versions & 1 rubygems