Permalink
Browse files

Don't rename users table to spree_users if there is a User class defined

If this were to happen, it would most-likely rename the users table for the application, and not the Spree one. The Spree table would never have been created because there would have already been a table called users.

hat-tip: @rohitnair
  • Loading branch information...
radar committed Jun 5, 2012
1 parent 5e2250b commit c77c822fbc21925f4e2f50b06af9bb91e38d9414
Showing with 3 additions and 1 deletion.
  1. +3 −1 core/db/migrate/20111007143030_namespace_top_level_models.rb
@@ -41,7 +41,9 @@ def change
rename_table :taxons, :spree_taxons
rename_table :taxonomies, :spree_taxonomies
rename_table :trackers, :spree_trackers
rename_table :users, :spree_users
unless defined?(User)
rename_table :users, :spree_users
end
rename_table :variants, :spree_variants
rename_table :zones, :spree_zones
rename_table :zone_members, :spree_zone_members

0 comments on commit c77c822

Please sign in to comment.