Class: Page
- Inherits:
-
Object
- Object
- Page
- Includes:
- ActiveModel::MassAssignmentSecurity, Mongoid::Document, Mongoid::Slug, Mongoid::Timestamps, StateMachines::Page
- Defined in:
- app/models/page.rb
Instance Method Summary collapse
-
#user ⇒ Object
belongs_to (SQL).
- #user=(value) ⇒ Object
Instance Method Details
#user ⇒ Object
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 |