Skip to content

Commit

Permalink
Replace ActiveSupport::OrderedHash with Hash because Ruby 1.9 Hash is…
Browse files Browse the repository at this point in the history
… ordering-aware and we no longer support Ruby 1.8
  • Loading branch information
Trung Lê committed Feb 23, 2013
1 parent d118ac1 commit 2482885
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions core/app/models/spree/order/checkout.rb
Expand Up @@ -18,8 +18,7 @@ def self.checkout_flow(&block)
end

def self.define_state_machine!
# Needs to be an ordered hash to preserve flow order
self.checkout_steps = ActiveSupport::OrderedHash.new
self.checkout_steps = {}
self.next_event_transitions = []
self.previous_states = [:cart]

Expand Down Expand Up @@ -110,7 +109,7 @@ def self.next_event_transitions
end

def self.checkout_steps
@checkout_steps ||= ActiveSupport::OrderedHash.new
@checkout_steps ||= {}
end

def self.add_transition(options)
Expand Down
2 changes: 1 addition & 1 deletion core/lib/tasks/core.rake
Expand Up @@ -16,7 +16,7 @@ use rake db:load_file[/absolute/path/to/sample/filename.rb]}
dir = args.dir
dir = File.join(Rails.root, "db", dir) if Pathname.new(dir).relative?

ruby_files = ActiveSupport::OrderedHash.new
ruby_files = {}
Dir.glob(File.join(dir , '**/*.{rb}')).each do |fixture_file|
ext = File.extname fixture_file
ruby_files[File.basename(fixture_file, '.*')] = fixture_file
Expand Down

0 comments on commit 2482885

Please sign in to comment.