Skip to content

Commit

Permalink
fix doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Giallombardo Nathan committed Jun 19, 2024
1 parent 2b943da commit 968acb7
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 10 deletions.
10 changes: 4 additions & 6 deletions docs/reference/associations.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions docs/reference/callbacks.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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|
Expand Down

0 comments on commit 968acb7

Please sign in to comment.