mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-10-11 09:40:04 -04:00
Merge pull request #43 from Skud/friendlymembers
missed these migrations. d'oh.
This commit is contained in:
commit
913695e795
2 files changed
+16
No files matched your search
@@ -0,0 +1,6 @@
|
||||
class AddSlugToUsers < ActiveRecord::Migration
|
||||
def change
|
||||
add_column :users, :slug, :string
|
||||
add_index :users, :slug, unique: true
|
||||
end
|
||||
end
|
||||
@@ -0,0 +1,10 @@
|
||||
class GiveOldMembersNewSlugs < ActiveRecord::Migration
|
||||
def up
|
||||
User.find_each(&:save)
|
||||
end
|
||||
|
||||
# note: this is basically impossible to reverse without removing
|
||||
# friendly_id, because friendly_id automatically updates the slug when
|
||||
# you save the object.
|
||||
|
||||
end
|
||||
Reference in new issue
Block a user