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
defmodule RampeFle.PhonetiqueCa do | |
use Crawly.Spider | |
@impl Crawly.Spider | |
#def base_url(), do: "http://www.phonetique.ca" | |
@base_url "http://www.phonetique.ca" | |
@impl Crawly.Spider | |
def init() do |
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
<script> | |
// starts to use what we got stored | |
var obj = getCookie(); | |
//img swap snippet below | |
var img = document.querySelectorAll("img.elIMG")[1]; | |
var img_href = document.querySelectorAll("img.elIMG")[1].dataset.imagelink; | |
// Starts to generate new img url based on cookie data | |
var new_img_href = img_href.replace(/#prod_geo#/g,obj.prod_geo).replace(/#prod_name#/g,obj.prod_name).replace(/#subprod_name#/g,obj.subprod_name).replace(/#offer_name#/g,obj.offer_name).replace(/#offer_device#/g,obj.offer_device); | |
// Add listener on image. Swap parameters on the image url query string if it is clicked! |
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
<script> | |
// starts to use what we got stored | gets button | |
var obj = getCookie(); | |
var button = document.querySelectorAll("a.elButton"); | |
// dsk button | |
var my_btn = button[0]; | |
href = my_btn.href; | |
href = href.replace(/#prod_geo#/g,obj.prod_geo); | |
href = href.replace(/#prod_name#/g,obj.prod_name); | |
href = href.replace(/#subprod_name#/g,obj.subprod_name); |
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
<script> | |
document.cookie; | |
function getCookie(Munchmothafuckincookies) { | |
var s1 = s1 + "="; | |
var decodedCookie = decodeURIComponent(document.cookie); | |
var ca = decodedCookie.split(';'); | |
for(var i = 0; i <ca.length; i++) { | |
var c = ca[i]; | |
while (c.charAt(0) == ' ') { | |
c = c.substring(1); |
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
<script> | |
$(document).ready(function () { | |
$(window).load(function () { | |
if (getURLParameter("aff_sub") != "null") { | |
var href = $("a[href*='#aff_sub#']").attr("href"); | |
href = href.replace(/#aff_sub#/g,getURLParameter("aff_sub")); | |
$("a[href*='#aff_sub#']").attr("href",href); | |
} | |
}); | |
}); |
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
<script> | |
$(function () { | |
var terms = { | |
"email": { //set your term name | |
"default": "" //set your default value | |
}, //don't forget commas to separate terms | |
"aff_sub": { | |
"default": "not given" | |
} | |
}; |
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
<%= form_for(@contact, html: { class: "basic-grey" }) do |f| %> | |
<% if @contact.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@contact.errors.count, "error") %> prohibited this contact from being saved:</h2> | |
<ul> | |
<% @contact.errors.full_messages.each do |message| %> | |
<li><%= message %></li> | |
<% end %> | |
</ul> |
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
By the serve log I can see that there is no 'OR' on the search query. How can one add it for my scope under the model? | |
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
// This is a manifest file that'll be compiled into application.js, which will include all the files | |
// listed below. | |
// | |
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, | |
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path. | |
// | |
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | |
// compiled file. JavaScript code in this file should be added after the last require_* statement. | |
// | |
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details |
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
PG::UndefinedColumn: ERROR: column db_campaigns.partner, does not exist LINE 1: ...(ts_rank((to_tsvector('simple', unaccent(coalesce("db_campai... ^ HINT: Perhaps you meant to reference the column "db_campaigns.partner" or the column "db_campaigns.partner". : SELECT SUM("db_campaigns"."sent") FROM "db_campaigns" INNER JOIN (SELECT "db_campaigns"."id" AS pg_search_id, (ts_rank((to_tsvector('simple', unaccent(coalesce("db_campaigns"."partner,"::text, ''))) || to_tsvector('simple', unaccent(coalesce("db_campaigns"."name,"::text, ''))) || to_tsvector('simple', unaccent(coalesce("db_campaigns"."segment,"::text, ''))) || to_tsvector('simple', unaccent(coalesce("db_campaigns"."theme,"::text, ''))) || to_tsvector('simple', unaccent(coalesce("db_campaigns"."database"::text, '')))), (to_tsquery('simple', ''' ' || unaccent('residencial') || ' ''')), 0)) AS rank FROM "db_campaigns" WHERE (((to_tsvector('simple', unaccent(coalesce("db_campaigns"."partner,"::text, ''))) || to_tsvector('simple', unaccent(coalesce("db_campai |
NewerOlder