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
Started PUT "/checkout/update/address" for 127.0.0.1 at 2012-12-16 15:51:24 +0400 | |
Processing by Spree::CheckoutController#update as HTML | |
Parameters: {"utf8"=>"✓", "authenticity_token"=>"FiZb2TZaAXOUlqPpdEKXuWmpya7ushZavJ1VgQ3a3rk=", "order"=>{"bill_address_attributes"=>{"firstname"=>"Николай", "lastname"=>"Пономарев", "address1"=>"Ленина", "address2"=>"", "city"=>"Мурманск", "state_name"=>"Регионgfhdfh", "zipcode"=>"adsf", "country_id"=>"35", "phone"=>"adsf"}, "use_billing"=>"1"}, "button"=>"", "state"=>"address"} | |
Spree::Preference Exists (0.2ms) SELECT 1 AS one FROM "spree_preferences" WHERE "spree_preferences"."key" = 'spree/app_configuration/allow_ssl_in_development_and_test' LIMIT 1 | |
Spree::Preference Load (0.2ms) SELECT "spree_preferences".* FROM "spree_preferences" WHERE "spree_preferences"."name" = 'allow_ssl_in_development_and_test' LIMIT 1 | |
Spree::Order Load (0.3ms) SELECT "spree_orders".* FROM "spree_orders" WHERE "spree_orders"."id" = 1069267034 LIMIT 1 | |
Spree::Adjustment Load (0.3ms) SE |
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
// FIXME: Please fix this file, I don't like how it looks now at all. | |
// Request help from KODER if u don't know what to do. | |
$(document).ready(function() { | |
buttons_manipulation(); | |
}); | |
function buttons_manipulation() { | |
$(".accept-form-block").hide(); | |
$(".decline-form-block").hide(); |
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
generate :scaffold, "admin/pages title slug:uniq:index description:text text:text published:boolean user:references" | |
gsub_file "db/migrate/*_create_admin_pages.rb", "t.boolean :published", "t.boolean :published, :default => false" |
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 'bundler' | |
gem_group :development, :test do | |
gem 'rspec-rails', '2.10.0' | |
gem 'guard' | |
gem 'guard-rspec', '0.5.5' | |
gem 'rb-inotify', '0.8.8' | |
gem 'libnotify', '0.5.9' | |
gem 'guard-spork', '0.3.2' | |
gem 'spork', '0.9.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
# template.rb | |
run "rm public/index.html" | |
generate(:scaffold, "person name:string") | |
route "map.root :controller => 'people'" | |
rake("db:migrate") | |
git :init | |
git :add => "." | |
git :commit => "-a -m 'Initial commit'" |
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
Gems included by the bundle: | |
* actionmailer (3.2.8) | |
* actionpack (3.2.8) | |
* activemodel (3.2.8) | |
* activerecord (3.2.8) | |
* activeresource (3.2.8) | |
* activesupport (3.2.8) | |
* addressable (2.3.2) | |
* arel (3.0.2) | |
* bcrypt-ruby (3.0.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
countries_168: | |
name: "Российская Федерация" | |
iso3: RUS | |
iso: RU | |
iso_name: RUSSIAN FEDERATION | |
id: "168" | |
numcode: "643" |
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
# Capistrano configuration | |
# | |
# require 'new_relic/recipes' - Newrelic notification about deployment | |
# require 'capistrano/ext/multistage' - We use 2 deployment environment: staging and production. | |
# set :deploy_via, :remote_cache - fetch only latest changes during deployment | |
# set :normalize_asset_timestamps - no need to touch (date modification) every assets | |
# "deploy:web:disable" - traditional maintenance page (during DB migrations deployment) | |
# task :restart - Unicorn with preload_app should be reloaded by USR2+QUIT signals, not HUP | |
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
#app/helpers/spree/addresses_helper.rb | |
module Spree::AddressesHelper | |
def address_field(form, method, id_prefix = "b", &handler) | |
content_tag :p, :id => [id_prefix, method].join('_'), :class => "field" do | |
if handler | |
handler.call | |
else | |
is_required = Spree::Address.required_fields.include?(method) | |
separator = is_required ? '<span class="req">*</span><br />' : '<br />' |
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
Deface::Override.new(:name => "remove billing address form", | |
:virtual_path => "spree/checkout/_address", | |
:remove => "#billing[data-hook]" | |
) | |
Deface::Override.new(:name => "remove use billing address checkbox", | |
:virtual_path => "spree/checkout/_address", | |
:remove => "[data-hook='use_billing']" | |
) |