For the Database initialization, what should be done with the code below, is there a yml file these should go before doing bundle install? What exactly is the step for database initialization? Thank you!
I figured out that it needs to run 'rails c' first and run each line above one at a time (copy all in the terminal won't work)
database setting file yml also need to add host: localhost etc
For the Database initialization, what should be done with the code below, is there a yml file these should go before doing bundle install? What exactly is the step for database initialization? Thank you!
Database initialization Creating a new user
user = User.new user.login = "super" user.email = "super@example.com" user.password = "your_password" user.password_confirmation = "your_password" user.save user.confirmed_at = Time.now user.save
role = Role.find_by_name('super user') user = User.find_by_login('super')
permission = Permission.new permission.role = role permission.user = user permission.save
role = Role.find_by_name('administrator') permission = Permission.new permission.role = role permission.user = user permission.save