friendly urls

This commit is contained in:
jomo
2014-09-22 06:46:08 +02:00
parent e767ec729c
commit 0f0a5c42b9
8 changed files with 37 additions and 2 deletions
+4
View File
@@ -23,4 +23,8 @@ class Forum < ActiveRecord::Base
def can_write?(user)
group.can_write?(user) && can_read?(user) && (role_write.nil? || (!user.nil? && user.role >= role_write))
end
def to_param
[id, to_s.parameterize].join("-")
end
end