diff --git a/app/models/page.rb b/app/models/page.rb index dd82ab3..87c2d35 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -74,7 +74,7 @@ class Page < ActiveRecord::Base # def set_created_person self[:created_by] = ApplicationController.current_people_id rescue nil - self.created_by ||= People.penguincoder + self[:created_by] ||= People.penguincoder end ## @@ -82,7 +82,7 @@ class Page < ActiveRecord::Base # def set_updated_person self[:updated_by] = ApplicationController.current_people_id rescue nil - self.created_by ||= People.penguincoder + self[:updated_by] ||= People.penguincoder end ## diff --git a/app/models/people.rb b/app/models/people.rb index da7d876..2efdae1 100644 --- a/app/models/people.rb +++ b/app/models/people.rb @@ -19,6 +19,7 @@ class People < ActiveRecord::Base # Finds me. # def self.penguincoder - self.find_by_title('PenguinCoder') rescue nil + @penguincoder ||= self.find_by_title('PenguinCoder') rescue nil + @penguincoder end end