Permalink
Browse files

Fixes #1382 for future versions by using :slugged from FriendlyId to…

… handle the fancy characters in a username.
  • Loading branch information...
parndt committed Mar 1, 2012
1 parent 98f793a commit ee569fb688b2665ddad51cc883473b47d43ffc38
@@ -7,7 +7,7 @@ class User < Refinery::Core::BaseModel
has_and_belongs_to_many :roles, :join_table => :refinery_roles_users
has_many :plugins, :class_name => "UserPlugin", :order => "position ASC", :dependent => :destroy
- friendly_id :username
+ friendly_id :username, :use => [:slugged]
# Include default devise modules. Others available are:
# :token_authenticatable, :confirmable, :lockable and :timeoutable
@@ -0,0 +1,7 @@
+class AddSlugToRefineryUsers < ActiveRecord::Migration
+ def change
+ add_column :refinery_users, :slug, :string
+ add_index :refinery_users, :slug
+
+ end
+end

0 comments on commit ee569fb

Please sign in to comment.