basic function

This commit is contained in:
Matthew K. Fu JuYuan committed 2012-09-17 12:06:21 +08:00
1 parent 7f290adfbb
commit 8e014bf59c
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