Skip to content

Instantly share code, notes, and snippets.

View zamith's full-sized avatar

Luís Ferreira zamith

View GitHub Profile
def track_event_on_mixpanel
Resque.enqueue MixpanelTrackEventJob, "Event", properties, env
end
(ns layouts.application
(:require [hiccup.page :as h]
[hourglass.helpers :as misc]))
(defn layout [page]
(h/html5
misc/pretty-head
(misc/pretty-body page)))
(defn home []
@zamith
zamith / app.js
Last active August 18, 2016 14:06
helpButton.on("click", event => {
chan.push("help_needed", {})
})
diff --git a/app/models/shipping/commodity.rb b/app/models/shipping/commodity.rb
index ae7b51bc..1cdcf3f7 100644
--- a/app/models/shipping/commodity.rb
+++ b/app/models/shipping/commodity.rb
@@ -2,10 +2,13 @@ module Shipping
class Commodity < ApplicationRecord
belongs_to :shipments
+ monetize :sales_unit_price_cents
+ monetize :total_price_cents
diff --git a/app/models/shipping/commodity.rb b/app/models/shipping/commodity.rb
index ae7b51bc..1cdcf3f7 100644
--- a/app/models/shipping/commodity.rb
+++ b/app/models/shipping/commodity.rb
@@ -2,10 +2,13 @@ module Shipping
class Commodity < ApplicationRecord
belongs_to :shipments
+ monetize :sales_unit_price_cents
+ monetize :total_price_cents