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
module Campaign | |
class Base < ActiveRecord::Base | |
include Campaign::Data | |
include Campaign::State | |
include Campaign::Events | |
include Campaign::Presenters | |
include Campaign::Services | |
end | |
end |
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
require 'active_support/concern' | |
module Campaign::Events | |
extend ActiveSupport::Concern | |
included do | |
def generate_event | |
Bus::Event::CampaignSubmittedForReview.create(:campaign => self) | |
end | |
end |
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
(require '[clojure.string :as str]) | |
(defn rename-underscore [sym] | |
[(symbol (str/replace (name sym) \_ \-)) | |
(keyword sym)]) | |
(defn udestructure [[lhs expr]] | |
(if (and (map? lhs) | |
(vector? (:_keys lhs))) | |
(let [msym (gensym) |
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
something |
OlderNewer