Class: Cambium::UserGenerator
- Inherits:
-
Rails::Generators::Base
- Object
- Rails::Generators::Base
- Cambium::UserGenerator
- Defined in:
- lib/generators/cambium/user_generator.rb
Instance Method Summary collapse
-
#create_user ⇒ Object
Create a user with the provided credentials.
Instance Method Details
#create_user ⇒ Object
Create a user with the provided credentials
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
# File 'lib/generators/cambium/user_generator.rb', line 22 def create_user if .admin == true User.create!( :email => email, :password => password, :password_confirmation => password, :is_admin => .admin ) else User.create!( :email => email, :password => password, :password_confirmation => password ) end end |