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 Spree::DropdownVariantsByOption::OrdersController | |
JS_ESCAPE_MAP = { '\\' => '\\\\', '</' => '<\/', "\r\n" => '\n', "\n" => '\n', "\r" => '\n', '"' => '\\"', "'" => "\\'" } | |
def self.included(target) | |
target.class_eval do | |
create.before << :add_variants_from_option_values | |
create.rescues ActiveRecord::RecordNotFound | |
create.wants.js | |
create.failure.wants.js { render :js => "alert('#{format_js_error}')" } |
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 Spree::Site::OrdersController | |
def self.included(target) | |
target.class_eval do | |
create.wants.js | |
create.failure.wants.js { render :js => "alert('#{format_js_error}')" } | |
end | |
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
<% flash[:notice] = nil %> | |
$("li.cart-indicator").html('<%= link_to_cart %>'); | |
alert('<%= t("item_added_to_cart") %>'); |
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
mysqldump -u $DB_USER -p$DB_PASS --compact --compatible=ansi --default-character-set=binary $DB_NAME | \ | |
grep -v ' KEY "' | \ | |
grep -v ' UNIQUE KEY "' | \ | |
grep -v ' PRIMARY KEY ' | \ | |
grep -ve '^SET ' | \ | |
sed 's/ UNSIGNED / /g' | \ | |
sed 's/ auto_increment/ primary key autoincrement/g' | \ | |
sed 's/ smallint([0-9]*) / integer /g' | \ | |
sed 's/ tinyint([0-9]*) / integer /g' | \ | |
sed 's/ int([0-9]*) / integer /g' | \ |
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
#!/bin/sh | |
# | |
# for each file in site/public/ dir, link it to the main /public dir so it can be edited directly. | |
# | |
# This script should be run AFTER the server is started, not before. | |
# | |
# | |
for FILE in vendor/extensions/site/public/[jsi]**/*; do | |
DIR=${FILE%/*} |
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
sbeam@pris ~/Sites/risepoker]$ ./script/console | |
Loading development environment (Rails 2.3.8) | |
ruby-1.8.7-p302 > user = User.find_by_email('[email protected]') | |
=> #<User id: 1, email: "[email protected]", crypted_password: "1f0777c516b7443484cdc4f0b11928e346ec31031fcb83b0712...", salt: "PreTkwuZsGGfCr7pXprw", remember_token: nil, remember_token_expires_at: nil, created_at: "2010-09-23 19:59:47", updated_at: "2010-09-27 20:48:27", persistence_token: "d0a60168b42533b95ae97935badca4a9626e9be500be5e283df...", single_access_token: "MCFb894ZaLlAsl3RPALZ", perishable_token: "hDp6RM24MI9YDPYbJY8K", login_count: 5, failed_login_count: 0, last_request_at: "2010-09-27 20:48:27", current_login_at: "2010-09-27 20:48:09", last_login_at: "2010-09-27 20:44:03", current_login_ip: "76.118.157.124", last_login_ip: "76.118.157.124", login: "[email protected]", ship_address_id: nil, bill_address_id: nil, openid_identifier: nil, api_key: nil> | |
ruby-1.8.7-p302 > user.password = user.password_confirmation = 'risepoker' | |
=> "r |
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_dependency 'application_controller' | |
class MailChimpExtension < Spree::Extension | |
version "1.0" | |
description "Mail Chimp API integration with your Spree Store, using the hominid gem" | |
url "http://github.com/sbeam/spree-mail-chimp.git" | |
def self.require_gems(config) | |
config.gem 'hominid', '>= 2.2.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
Processing CheckoutsController#update (for 71.168.112.22 at 2010-11-24 04:59:59) [PUT] | |
Parameters: {"step"=>"address", "order_id"=>"R257486814", "action"=>"update", "_method"=>"put", "authenticity_token"=>"dX4pj58PjCHGKMvQFasLjFurQeeaGgdt/P5cfUtyVCM=", "controller"=>"checkouts", "checkout"=>{"bill_address_attributes"=>{"address1"=>"123 Test Rd", "city"=>"Newark", "address2"=>"Suite G-1", "zipcode"=>"NY\#@", "country_id"=>"214", "lastname"=>"Customero", "id"=>"67", "firstname"=>"Test", "phone"=>"", "state_id"=>"769938586"}, "ship_address_attributes"=>{"id"=>"68", "state_id"=>"721598219"}, "use_billing"=>"1"}} | |
Cache hit: Spree::Config ({}) | |
..... | |
Cache hit: Spree::ActiveShipping::Config ({}) | |
***** Debugger requested, but was not available: Start server with --debugger to enable ***** | |
Cache write: UPS-R257486814-US-IN-Newark-NY#@-266_1 |
OlderNewer