many tiny changes

This commit is contained in:
jomo
2013-06-25 02:53:12 +02:00
parent c5dfdbeb8f
commit ceb39bf0c3
22 changed files with 209 additions and 80 deletions
+8
View File
@@ -4,4 +4,12 @@ class Blogpost < ActiveRecord::Base
belongs_to :user
has_many :comments
accepts_nested_attributes_for :comments
def author
@author ||= if user.present?
user
else
User.find_by_name("Deleted user")
end
end
end