Skip to content
This repository has been archived by the owner on Jun 25, 2019. It is now read-only.

Commit

Permalink
We must make sure that when it is time to pick up and move in the win…
Browse files Browse the repository at this point in the history
…ter we have not gotten ahead of ourselves and already moved for next summer.
  • Loading branch information
busbey committed Mar 27, 2010
1 parent 366ead6 commit d74495d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/camping/ar.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def self.create_schema(opts = {})
si = SchemaInfo.find(:first) || SchemaInfo.new(:version => opts[:assume])
if si.version < opts[:version]
@migrations.each do |k|
(@migrations.sort do |a,b| a.version <=> b.version end).each do |k|
k.migrate(:up) if si.version < k.version and k.version <= opts[:version]
k.migrate(:down) if si.version > k.version and k.version > opts[:version]
end
Expand Down

2 comments on commit d74495d

@rampion
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shorter: @migrations.sort_by(&:version)

@busbey
Copy link
Owner Author

@busbey busbey commented on d74495d Mar 30, 2010

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ooh! shiny. man, I'm terrible at ruby.

Please sign in to comment.