This is a Ruby script for notifying new job arrivals from your upwork feed. Notification includes a tome played using mpg321 applocation and linux desktop notification.You need to store the header file http request to "cred_file" mentioed (use your network inspector ). This output latest project name to a "project" file. Everything is self-explanotory. ( Dont forget to chmod +x )
This file contains 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
class Order < ApplicationRecord | |
belongs_to :customer | |
end | |
class Customer < ApplicationRecord | |
has_many :orders | |
def totals_by_customer | |
Student.joins(:orders).includes(:orders).map { |student| | |
[ student , student.orders.sum(:total) ] | |
} |