This file contains hidden or 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 'spec_helper' | |
describe 'PhotoGallery', :js => true do | |
before(:each) do | |
bootstrap | |
user_logs_in | |
@page = create_photo_gallery_page(@website) | |
visit "#{get_subdomain(@website)}/site_manager/pages" |
This file contains hidden or 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
$ rspec ./spec/features/billboard_spec.rb:19 | |
WARNING: Nokogiri was built against LibXML version 2.8.0, but has dynamically loaded 2.7.8 | |
Run options: include {:locations=>{"./spec/features/billboard_spec.rb"=>[19]}} | |
[deprecated] I18n.enforce_available_locales will default to true in the future. If you really want to skip validation of your locale you can set I18n.enforce_available_locales = false to avoid this message. | |
An error occurred in an after hook | |
VCR::Errors::UnhandledHTTPRequestError: | |
================================================================================ | |
An HTTP request has been made that VCR does not know how to handle: |
This file contains hidden or 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
class Product < ActiveRecord::Base | |
# model code here... | |
# for Sunspot gem. Need to run rake sunspot:solr:start to get this running, and to avoid connection errors. | |
# each time you change the searchable code on a model, you need to reindex the solr database locally. | |
searchable do | |
integer :id | |
text :name | |
text :artist |
This file contains hidden or 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
function visitorUploadToCloudinary(form) { | |
var uploadButton = $(form).find('.cloudinary-fileupload'), | |
uploadLimit = parseInt($(form).data('limit')), | |
uploadLimitFriendly = (uploadLimit / 1000000) + 'mb'; | |
// prevents form attribute from allowing uploads larger than 300mb. | |
if ( uploadLimit > 300000000 ) { | |
uploadLimit = 300000000; | |
} |
This file contains hidden or 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
function visitorUploadToCloudinary(form) { | |
var uploadButton = $(form).find('.cloudinary-fileupload'), | |
uploadLimit = parseInt($(form).data('limit')), | |
uploadLimitFriendly = (uploadLimit / 1000000) + 'mb'; | |
// prevents form attribute from allowing uploads larger than 100mb. | |
if ( uploadLimit > 300000000 ) { | |
uploadLimit = 300000000; | |
} |
This file contains hidden or 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
class OrderAssetsZipDownloadCreator | |
def self.build(order) | |
@order = order | |
unless @order.download_zip_url.present? #prevent duplicate images from being added to zip. | |
reupload_assets_with_tag | |
create_zip | |
end | |
end |
This file contains hidden or 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
SiteManager::PagesController < ApplicationController | |
end | |
def sort_children(element,dbitem) | |
+ tries = 3 | |
prevchild = nil | |
element['children'].each do |child| | |
- childitem = Page.find(child['id']) | |
- prevchild.nil? ? childitem.move_to_child_of(dbitem) : childitem.move_to_right_of(prevchild) | |
- sort_children(child, childitem) unless child['children'].nil? |
This file contains hidden or 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
add_index :carts, [:id, :deleted_at] | |
add_index :carts, [:token, :deleted_at] | |
add_index :carts, [:coupon_id, :deleted_at] | |
add_index :line_items, [:id, :deleted_at] | |
add_index :line_items, [:quantity, :deleted_at] | |
add_index :websites, [:id, :deleted_at] | |
add_index :websites, [:subdomain, :deleted_at] | |
add_index :websites, [:stripe_customer_id, :deleted_at] | |
add_index :products, [:id, :deleted_at] | |
add_index :products, [:slug, :deleted_at] |
This file contains hidden or 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
Connecting to database specified by database.yml | |
** [Honeybadger] Unable to start Honeybadger -- api_key is missing or invalid. level=2 pid=8076 | |
Connecting to database specified by database.yml | |
** [Honeybadger] Unable to start Honeybadger -- api_key is missing or invalid. level=2 pid=8056 | |
Cache read: http://demosite.lvh.me:3000/store/art_print_products/callout1-lrzg9a? | |
Dalli::Server#connect 127.0.0.1:11211 | |
Started GET "/store/art_print_products/callout1-lrzg9a" for 127.0.0.1 at 2015-10-01 09:29:40 -0500 | |
[1m[36mReseller Load (1.4ms)[0m [1mSELECT "resellers".* FROM "resellers" WHERE ("resellers"."deleted_at" IS NULL)[0m |
This file contains hidden or 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
xml.instruct! | |
xml.tag!('LLXML', { 'id' => 'Lab Order' }) do | |
xml.Creator 'Art Storefronts' | |
xml.Version 'ASF 2.12' | |
xml.Orders do | |
@exportable_orders.each do |order| |