create a web database with ruby code example
Example 1: new rails app with mysql
rails new app_name --skip-webpack-install --skip-javascript -d mysql
Example 2: how to create an SQL save method in ruby
def save
sql = <<-SQL
INSERT INTO songs (name, album)
VALUES (?, ?)
SQL
DB[:conn].execute(sql, self.name, self.album)
end