basic function

This commit is contained in:
Matthew K. Fu JuYuan authored and Christophe Vilayphiou committed 2012-09-17 13:32:52 +08:00
1 parent 9eed9ec7b6
commit 19db9d0037
26 files changed
+420 -185

No files matched your search

+9
View File
@@ -260,4 +260,13 @@ module ApplicationHelper
wrap_mark = options[:wrap_mark] || "<br />"
str.scan((/.{0,#{line_width}}/)).join(wrap_mark)
end
def show_avatar(user)
if (user.avatar? rescue false)
image_tag(user.avatar.thumb.url)
else
image_tag "person.png"
end
end
end