Class: PageHistory

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/page_history.rb

Class Method Summary collapse

Class Method Details

.record(page, user_id, activity, details, is_publishable = false, content_id = nil, block_instance_id = nil) ⇒ Object



6
7
8
9
10
11
12
13
14
15
16
# File 'app/models/page_history.rb', line 6

def self.record(page,  user_id, activity, details, is_publishable=false, content_id=nil, block_instance_id = nil)
  ph = PageHistory.new
  ph.page = page
  ph.createdby_id = user_id
  ph.activity = activity
  ph.details = details
  ph.is_publishable = is_publishable
  ph.page_content_id = content_id 
  ph.block_instance_id = block_instance_id
  ph.save
end