Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions core/app/models/spree/payment.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,9 @@ class Payment < ActiveRecord::Base

scope :from_credit_card, lambda { where(:source_type => 'Spree::CreditCard') }
scope :with_state, lambda { |s| where(:state => s) }
scope :completed, with_state('completed')
scope :pending, with_state('pending')
scope :failed, with_state('failed')
scope :completed, -> { with_state('completed') }
scope :pending, -> { with_state('pending') }
scope :failed, -> { with_state('failed') }

# order state machine (see http://github.com/pluginaweek/state_machine/tree/master for details)
state_machine :initial => 'checkout' do
Expand Down
10 changes: 6 additions & 4 deletions core/config/routes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

resources :products

match '/locale/set', :to => 'locale#set'
match '/locale/set', :to => 'locale#set', via: [:get]

resources :tax_categories

Expand Down Expand Up @@ -46,7 +46,7 @@
end

# route globbing for pretty nested taxon and product paths
match '/t/*id', :to => 'taxons#show', :as => :nested_taxons
match '/t/*id', :to => 'taxons#show', :as => :nested_taxons, via: [:get]

namespace :admin do
get '/search/users', :to => "search#users", :as => :search_users
Expand Down Expand Up @@ -178,8 +178,10 @@
end
end

match '/admin', :to => 'admin/orders#index', :as => :admin
# RAILSUPDATE_FIXME: spree_dash内のルーティングと重複している
# 今使っているかどうかが不明なので確認して対応する
#match '/admin', :to => 'admin/orders#index', :as => :admin, via: [:get]

match '/content/cvv', :to => 'content#cvv', :as => :cvv
match '/content/cvv', :to => 'content#cvv', :as => :cvv, via: [:get]
match '/content/*path', :to => 'content#show', :via => :get, :as => :content
end
10 changes: 5 additions & 5 deletions core/spree_core.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,18 +21,18 @@ Gem::Specification.new do |s|
s.add_dependency 'acts_as_list', '= 0.1.4'
s.add_dependency 'awesome_nested_set', '2.1.4'

s.add_dependency 'jquery-rails', '~> 2.0'
s.add_dependency 'jquery-rails', '>= 2.0.0'
s.add_dependency 'select2-rails', '~> 3.0'

s.add_dependency 'highline', '= 1.6.11'
s.add_dependency 'state_machine', '= 1.1.2'
s.add_dependency 'ffaker', '~> 1.12.0'
s.add_dependency 'paperclip', '~> 2.8'
s.add_dependency 'paperclip'
s.add_dependency 'aws-sdk', '~> 1.3.4'
s.add_dependency 'ransack', '~> 0.7.0'
s.add_dependency 'ransack'
s.add_dependency 'activemerchant', '= 1.28.0'
s.add_dependency 'rails', '~> 3.2.9'
s.add_dependency 'kaminari', '0.13.0'
s.add_dependency 'rails', '~> 4.0.0'
s.add_dependency 'kaminari', '>= 0.13.0'
s.add_dependency 'deface', '>= 0.9.0'
s.add_dependency 'stringex', '~> 1.3.2'
s.add_dependency 'cancan', '1.6.7'
Expand Down
2 changes: 1 addition & 1 deletion dash/config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Spree::Core::Engine.routes.prepend do
match '/admin' => 'admin/overview#index', :as => :admin
match '/admin' => 'admin/overview#index', :as => :admin, via: [:get]

get '/admin/analytics/sign_up' => 'admin/analytics#sign_up', :as => :admin_analytics_sign_up
post '/admin/analytics/register' => 'admin/analytics#register', :as => :admin_analytics_register
Expand Down