Skip to content
View sequel.rb
module Datagrid
module Drivers
class Sequel < AbstractDriver #:nodoc:
def self.match?(scope)
return false unless defined?(::Sequel)
if scope.is_a?(Class)
scope.ancestors.include?(::Sequel::Model)
else
scope.is_a?(::Sequel::Dataset)
View referrals.rb
# == Schema Information
#
# Table name: referrals
#
# id :integer not null, primary key
# referred_origin_id :integer not null
# offer_id :integer
# self_referral :boolean default(FALSE), not null
# cross_referral :boolean default(FALSE), not null
# fraud :boolean default(FALSE), not null
View diff.diff
diff --git a/app/models/campaign.rb b/app/models/campaign.rb
index f1b12a5..7d54830 100644
--- a/app/models/campaign.rb
+++ b/app/models/campaign.rb
@@ -687,10 +687,13 @@ class Campaign < BaseModel
end
def expires_at_for_share
+ # If new share needs to be created in expired campaign
+ # we prepare only set it relatively to the campaign deactivation
View grid_export_worker.rb
class GridExportWorker
include Sidekiq::Worker
sidekiq_options queue: :export
class << self
def count_with_limit(grid, limit)
# Remove pagination if any
csv_grid = grid.class.new(grid.attributes)
csv_grid.cached = false
csv_grid.count_with_limit(limit)
View gist:9402ee4e61d592c46b19
production >> EmailOfferShare.find(6726891).campaign.single_visitor_for_direct_shares?
=> true
production >> EmailOfferShare.find(6726891).offer.visitor_offers
=> #<ActiveRecord::Associations::CollectionProxy []>
production >>
View criteria.html.liquid
{% assign status = false %}
{% for code in friend_origin.coupon_codes %}
{% assign code_first_part = code | slice: 0, 4 %}
{% if code_first_part == "7XUB" %}
{% assign status = true %}
{% endif %}
{% endfor %}
{% if advocate_info.referrals_count <= 10 %}
View zz.diff
commit 5ac232d175d11e9126e973e3fa2f75f66b6bc318
Author: Bogdan Gusiev <agresso@gmail.com>
Date: Tue Apr 21 17:44:24 2015 +0300
Don't push yaml to sidekiq
diff --git a/app/controllers/concerns/public_template_rendering.rb b/app/controllers/concerns/public_template_rendering.rb
index 5c158e2..cd2178f 100644
--- a/app/controllers/concerns/public_template_rendering.rb
+++ b/app/controllers/concerns/public_template_rendering.rb
View gist:ee40b6ac30de50a35fdf
| Email | Kickbox valid | mailgun valid |
| 0shawnjohnson@gmail.com | true | true |
| 1@gmail.co | true | false |
| 11@gmail.co | true | false |
| 111@dsa.co | false | true |
| 111111@dsad.co | false | false |
| 12@gmail.co | true | false |
| 1211221@yahoo.com | false | false |
| 121193agi@gmail.com | true | true |
| 12311@gmail.co | true | false |
View _signup_flow_header.html.haml
#signupFlowHeader
- signup_flow_step 1 do
%h3 1. Register Store
- signup_flow_step 2 do
%h3 2. Integrate Curebit
- signup_flow_step 3, 4 do
%h3 3. Setup Campaign
.alert.alert-warning{:class => "step#{current_signup_flow_step}"}
- case current_signup_flow_step
- when 1:
View digest.java
import java.security.MessageDigest;
import java.security.NoSuchAlgorithmException;
import java.io.UnsupportedEncodingException;
import java.security.*;
public class HelloWorld {
public static void main(String []args)
throws UnsupportedEncodingException, NoSuchAlgorithmException {
Something went wrong with that request. Please try again.