Class: Page

Inherits:
Object
  • Object
show all
Includes:
ActiveModel::MassAssignmentSecurity, Mongoid::Document, Mongoid::Slug, Mongoid::Timestamps, StateMachines::Page
Defined in:
app/models/page.rb

Instance Method Summary collapse

Instance Method Details

#userObject

belongs_to (SQL)



29
# File 'app/models/page.rb', line 29

def user; user_id ? User.find(user_id) : nil; end

#user=(value) ⇒ Object



30
# File 'app/models/page.rb', line 30

def user=(value); self.user_id = value.id; end