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
#if this begins to fail, the issue is likely with the naming scheme on the | |
#SQL columns. This expects tableType_name. | |
#That would mean lawyers_fname would be chill but lawyers_f_name would | |
#fail into a misserable amount of fiery poop |
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
$(document).ready(function() { | |
$("ol.comment-post").delegate("#reply-btn", "click", function(event) { | |
event.preventDefault(); | |
console.log("we have mercy"); | |
}); | |
}); |
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 'berkshelf/vagrant' | |
Vagrant.configure('2') do |config| | |
# Define VM box to use | |
config.vm.box = "precise64" | |
config.vm.box_url = "http://files.vagrantup.com/precise32.box" | |
# Use hostonly network with a static IP Address | |
config.vm.network :private_network, ip: "172.90.90.80" |
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
<?php | |
include_once "inc/incConstants.php"; | |
include 'request_model.php'; | |
if($logon!=1){ | |
header("Location:".$secureURL."/home"); | |
} | |
$client_info = getAccountByID('client', $userID); | |
$selected_bids = get_bids(null, 'selected', $get['id']); | |
//get_bids returns an array that usually has more than one bid | |
$bid = $selected_bids[0]; |
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
def add_to_cart(name, variant=nil) | |
visit spree.root_path | |
click_link name | |
choose variant if variant | |
click_button 'add-to-cart-button' | |
end | |
def user_login(user) | |
fill_in 'spree_user_email', :with => user.email | |
fill_in 'spree_user_password', :with => 'secret' |
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
# Configure Rails Environment | |
ENV['RAILS_ENV'] = 'test' | |
require File.expand_path('../dummy/config/environment.rb', __FILE__) | |
require 'rspec/rails' | |
require 'capybara/rspec' | |
require 'database_cleaner' | |
require 'ffaker' | |
Capybara.javascript_driver = :webkit |
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
def add_to_cart(name, variant=nil) | |
visit(spree.root_path) | |
click_link name | |
choose variant if variant | |
click_button 'add-to-cart-button' | |
end | |
def user_login(user) | |
fill_in 'spree_user_email', :with => user.email | |
fill_in 'spree_user_password', :with => 'secret' |
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 'spec_helper' | |
describe 'Checkout' do | |
let(:user) { create(:user) } | |
let(:product) { create(:product, name: 'awesome-sauce') } | |
before(:each) do | |
visit spree.root_path | |
create(:payment_method) | |
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 'spec_helper' | |
feature "Add child", %q{ | |
as a user | |
when I log into my account | |
I can successfully add a kid | |
} do | |
let(:user) { Fabricate(:user) } | |
let(:kid) { Fabricate(:kid) } |
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
class AuthenticatorConstructor | |
def self.build(*args) | |
new.build(*args) | |
end | |
def build(authenticator, user_id) | |
authenticator.merge({user_id: user_id}) | |
Authenticator.create(authenticator_params) | |
end |