Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 4c8088af900077df26a325235e6610ae89702c90 1 parent 1e95220
@radar radar authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 core/db/migrate/20111007143030_namespace_top_level_models.rb
View
4 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
Please sign in to comment.
Something went wrong with that request. Please try again.