Skip to content

Instantly share code, notes, and snippets.

View stasyanx's full-sized avatar

stas stasyanx

  • Ukraine
View GitHub Profile
class Payroll < ActiveRecord::Base
scope :ordered, -> { order(starts_at: :asc) }
class << self
def no_payrolls?
all.length == 0
end
require 'paperclip'
class Advertiser
include MongoMapper::Document
include Paperclip::Glue
include MMPaperclip
key :name, String
key :city_id, ObjectId
key :logo, String
key :description, $text