Skip to content

Commit 8c34ff3

Browse files
committed
Fix authorpermalink bug
1 parent 326fb47 commit 8c34ff3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/models/author.rb

+3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@ class Author < ActiveRecord::Base
33
has_many :authorships
44
has_many :codes, :through => :authorships
55

6+
after_create :update_slug_name
7+
68
def permalink
9+
return "#" if self.slug_name.blank?
710
URL_ROOT + "authors/" + self.slug_name
811
end
912

0 commit comments

Comments
 (0)