Skip to content

Commit

Permalink
fix migration move_edit_to_user. Failed if no editor in settings
Browse files Browse the repository at this point in the history
  • Loading branch information
shingara committed Nov 19, 2008
1 parent 6da9474 commit 3eddcf8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/migrate/075_move_editor_to_user.rb
Expand Up @@ -4,7 +4,7 @@ def self.up

unless $schema_generator
blog = Blog.default
editor = blog.settings.fetch('editor')
editor = blog.editor
users = User.find(:all)
users.each do |user|
user.editor = editor.to_i
Expand All @@ -17,4 +17,4 @@ def self.up
def self.down
remove_column :users, :editor
end
end
end

0 comments on commit 3eddcf8

Please sign in to comment.