[Nitro] [ANN] Nitro/Og 0.31.0

G

gabriele renzi

Daniel DeLorme ha scritto:
That's a cute example, but it leaves me with one big question:
how the hell does Og know that Content maps to the database and
that Demo does not?

because Demo does not use model objects' methods, such as the enhanced
attr_* or belongs_to.
You have the chance to fine tune this, anyway, in case that Og is not
smart enough to find the classes correctly (it usually works fine, anyway)
 
G

George Moschovitis

That's a cute example, but it leaves me with one big question:
how the hell does Og know that Content maps to the database and
that Demo does not?

Og manages classes that define serializable attributes. A serializable
attribute is an attribute with a class annotation. This works great
for 95% of the cases. For the rest, you can use Og features like the
following to customize the behaviour, including:

class XXX
is Unmanageabke
end

or

class XXX
attr_accessor :test, String, :serializable => false
end

etc, etc.

regards,
George.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top