diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index c784546d..49df37cb 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -7,8 +7,7 @@ class ApplicationController < ActionController::Base private def set_stamper - # BUG: I expect this to fail - # TODO: hack while we have no authentication - User.stamper = User.first() #self.current_user + # current_user is provided by devise + User.stamper = self.current_user end end diff --git a/app/models/user.rb b/app/models/user.rb index 14cf8401..11afe20d 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -16,4 +16,5 @@ class User < ActiveRecord::Base # validation validates_presence_of :display_name validates_uniqueness_of :display_name, :email, :case_sensitive => false + has_friendly_id :display_name, :use_slug => true, :strip_non_ascii => true end