Class: Obj

Inherits:
Scrivito::BasicObj show all
Defined in:
app/models/obj.rb,
lib/generators/scrivito/install/templates/app/models/obj.rb

Overview

The class Obj should be overridden by the application (see example). The SDK provides methods for Obj through it’s abstract base class, Scrivito::BasicObj. The Scrivito SDK provides this empty implementation for Obj which will only be used in case the app does not define the class Obj itself.

Examples:

# in app/models/obj.rb
class Obj < Scrivito::BasicObj
  # put your custom extensions that apply to every Obj here
end

# in app/models/page.rb
class Page < Obj
  # put custom extensions that only apply to Objs with class Page here
end

Method Summary

Methods included from Scrivito::Associations::ClassMethods

#belongs_to, #belongs_to_many, #has_many

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Scrivito::AttributeContent