Permalink
Browse files

Minor tweaks for checkout

  • Loading branch information...
1 parent 27cf0fe commit 0ecbaab999e0486da16a986e70620c7a6be7259f @BDQ BDQ committed with schof Jun 20, 2010
Showing with 32 additions and 32 deletions.
  1. +2 −2 Gemfile
  2. +3 −3 app/models/state.rb
  3. +20 −20 config/routes.rb
  4. +7 −7 lib/spree/theme_support/more_patches.rb
View
@@ -1,7 +1,7 @@
source :gemcutter
gem 'rails', '3.0.0.beta4'
-gem 'mysql'
+gem 'mysql'
gem 'highline', '1.5.1'
gem 'authlogic','>=2.1.5'
@@ -12,7 +12,7 @@ gem 'less', '1.2.20'
gem 'stringex', '1.0.3', :require => 'stringex'
gem 'chronic', '0.2.3'
gem 'whenever', '0.3.7', :require => false
-gem 'will_paginate', '2.3.14', :require => 'will_paginate'
+gem "will_paginate", :git => "git://github.com/mislav/will_paginate.git", :branch => "rails3"
gem 'state_machine', '0.9.2', :require => 'state_machine'
gem 'faker', '0.3.1'
gem 'paperclip', '>=2.3.1.1'
View
@@ -4,9 +4,9 @@ class State < ActiveRecord::Base
has_one :zone_member, :as => :zoneable
has_one :zone, :through => :zone_member
-
- validates [:country, :name], :presence => true
-
+
+ validates :country, :name, :presence => true
+
def <=>(other)
name <=> other.name
end
View
@@ -50,7 +50,7 @@
# You can have the root of your site routed with "root"
# just remember to delete public/index.html.
# root :to => "welcome#index"
-
+
match 'login' => 'user_sessions#new'
match 'logout' => 'user_sessions#destroy'
match 'signup' => 'users#new'
@@ -66,14 +66,14 @@
get :nav_bar
end
end
-
+
match '/account' => 'users#show'
-
+
resources :password_resets
# # login mappings should appear before all others
match '/admin' => 'admin/overview#index', :as => :admin
-
+
match '/locale/set' => 'locale#set'
resources :tax_categories
@@ -83,16 +83,16 @@
end
resources :states, :only => :index
-
+
resources :users
-
+
resources :orders do
resources :line_items
resources :creditcards
resources :creditcard_payments
member do
get :address_info
- end
+ end
end
resources :orders do
@@ -104,7 +104,7 @@
get :shipping_method
end
end
- resources :checkout do
+ resource :checkout do
member do
get :register
put :register
@@ -118,7 +118,7 @@
put :shipping_method
end
end
-
+
# # Search routes
match 's/:product_group_query' => 'products#index', :as => :simple_search
match '/pg/:product_group_name' => 'products#index', :as => :pg_search
@@ -127,14 +127,14 @@
# # route globbing for pretty nested taxon and product paths
match '/t/*id' => 'taxons#show', :as => :nested_taxons
- #
+ #
# #moved old taxons route to after nested_taxons so nested_taxons will be default route
# #this route maybe removed in the near future (no longer used by core)
# map.resources :taxons
#
-
-
-
+
+
+
namespace :admin do
resources :coupons
resources :zones
@@ -150,7 +150,7 @@
resources :image
member do
get :clone
- end
+ end
resources :variants
resources :options_types do
member do
@@ -179,7 +179,7 @@
get :filtered
end
end
-
+
resources :prototypes do
member do
post :select
@@ -214,15 +214,15 @@
put :finalize
end
end
- end
+ end
resource :general_settings
resources :taxonomies do
member do
get :get_children
end
-
+
resources :taxons
end
@@ -242,14 +242,14 @@
resources :product_groups do
resources :product_scopes
end
-
-
+
+
resources :trackers
resources :payment_methods
end
match '/:controller(/:action(/:id(.:format)))'
-
+
# # a catchall route for "static" content
match '*path' => 'content#show'
@@ -1,12 +1,12 @@
# Patches for the 'more' plugin which adds LessCSS Support to Rails
# We need more to be able to load stylesheets from app/stylesheets in
# each extension then write them to the same destination. Where stylesheets
-# of the same name exist in different extensions, the file in the last
+# of the same name exist in different extensions, the file in the last
# extension to be loaded takes precedence allowing them to be overriden
# in the same manner as views
class Less::More
-
+
class << self
def source_paths
@@ -27,7 +27,7 @@ def generate(path_as_array)
end
css
end
-
+
def generate_css(source)
engine = File.open(source) {|f| Less::Engine.new(f) }
css = engine.to_css
@@ -54,7 +54,7 @@ def compile(path_as_array)
end
end
end
-
+
# Array of Pathname instances for all the less source files.
def all_less_files
@@ -63,7 +63,7 @@ def all_less_files
all_less_files_in_path(pathname)
end.flatten
end
-
+
def all_less_files_in_path(pathname)
Dir[pathname.join("**", "*.{css,less,lss}").to_s].map! {|f| Pathname.new(f) }
end
@@ -84,7 +84,7 @@ def parse
# Store CSS
path_as_array[-1] = path_as_array[-1] + ".css"
- destination = Pathname.new(Rails.root.join(, "public", Less::More.destination_path)).join(*path_as_array)
+ destination = Pathname.new(Rails.root.join("public", Less::More.destination_path)).join(*path_as_array)
destination.dirname.mkpath
File.open(destination, "w") {|f|
@@ -108,7 +108,7 @@ def pathname_from_filename(filename)
self.source_paths.map do |source_path|
Pathname.glob(File.join(source_path.to_s, filename))[0]
end.compact.first
- end
+ end
end

0 comments on commit 0ecbaab

Please sign in to comment.