diff --git a/docs/reference/associations.txt b/docs/reference/associations.txt index 7f6ad45e..b2ca1117 100644 --- a/docs/reference/associations.txt +++ b/docs/reference/associations.txt @@ -130,14 +130,12 @@ macro with some additional options to tell CouchbaseOrm how to hook them up. .. code-block:: ruby - class Car - include CouchbaseOrm::Document - belongs_to :engine, class_name: "Motor", inverse_of: :machine + class Car < CouchabseOrm::Base + belongs_to :engine, class_name: "Motor" end - class Motor - include CouchbaseOrm::Document - has_many :machine, class_name: "Car", inverse_of: :engine + class Motor < CouchabseOrm::Base + has_many :machine, class_name: "Car" end Custom Foreign Keys diff --git a/docs/reference/callbacks.txt b/docs/reference/callbacks.txt index 21e3697a..f2a6fc95 100644 --- a/docs/reference/callbacks.txt +++ b/docs/reference/callbacks.txt @@ -56,8 +56,7 @@ for cross-cutting concerns, like queueing up background jobs. .. code-block:: ruby - class Article - include CouchbaseOrm::Document + class Article < CouchabseOrm::Base attribute :name, type: String attribute :body, type: String attribute :slug, type: String @@ -79,8 +78,7 @@ syntax as well: .. code-block:: ruby - class Article - include CouchbaseOrm::Document + class Article < CouchabseOrm::Base attribute :name, type: String set_callback(:create, :before) do |document|