adding default user as myself for all console or backend-generated material
git-svn-id: http://svn.barleysodas.com/barleysodas/trunk@66 0f7b21a7-9e3a-4941-bbeb-ce5c7c368fa7master
parent
223c45559f
commit
4a5033b3f8
|
@ -73,14 +73,16 @@ class Page < ActiveRecord::Base
|
|||
# Sets the People marker for created_by on creation.
|
||||
#
|
||||
def set_created_person
|
||||
self[:created_by] = ApplicationController.current_people_id
|
||||
self[:created_by] = ApplicationController.current_people_id rescue nil
|
||||
self.created_by ||= People.penguincoder
|
||||
end
|
||||
|
||||
##
|
||||
# Sets the People marker for updated_by on save.
|
||||
#
|
||||
def set_updated_person
|
||||
self[:updated_by] = ApplicationController.current_people_id
|
||||
self[:updated_by] = ApplicationController.current_people_id rescue nil
|
||||
self.created_by ||= People.penguincoder
|
||||
end
|
||||
|
||||
##
|
||||
|
|
|
@ -4,6 +4,7 @@ class CreatePeoples < ActiveRecord::Migration
|
|||
t.column :title, :string
|
||||
end
|
||||
People.create :title => 'Guest', :page => Page.new
|
||||
People.create :title => 'PenguinCoder', :page => Page.new
|
||||
end
|
||||
|
||||
def self.down
|
||||
|
|
Reference in New Issue