This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require "active_record" | |
ActiveRecord::Base.establish_connection("postgres:///db") | |
insert = Arel::Nodes::InsertStatement.new | |
insert.relation = Arel::Table.new(:movies) | |
insert.columns = hash.keys.map { |k| Arel::Table.new(:movies)[k] } | |
insert.values = Arel::Nodes::Values.new(hash.values, insert.columns) | |
ActiveRecord::Base.connection.execute(insert.to_sql) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#user nobody; | |
#Defines which Linux system user will own and run the Nginx server | |
worker_processes 1; | |
#Referes to single threaded process. Generally set to be equal to the number of CPUs or cores. | |
#error_log logs/error.log; #error_log logs/error.log notice; | |
#Specifies the file where server logs. |