[Nitro] on_load in og ?

George Moschovitis george.moschovitis at gmail.com
Thu Jan 26 04:28:49 EST 2006


> yeah use a nice aspect in your model like
>
> pre :call_this, :on => :og_read

or

before :call_this, :on => og_read

or

before 'my ruby code here', :on => og_read

or

before { my ruby code }, :on => og_read

etc etc...


>
> def call_this
>  # do some stuff
>  @somevar = "this"
> end
>
>
> chrisfarms
>
>
>
> On 25 Jan 2006, at 23:06, Bryan Soto wrote:
>
> On 1/25/06, Jonas Pfenniger <zimba.tm at gmail.com> wrote:
> > Hi list,
> >
> > does somebody know if Og calls a particular method when and object is
> > loaded form the database ?
> >
> >
>
>  Perhaps og_read is what you're looking for?
>
>   From og/lib/og/store/sql.rb
>
>    # Compile the og_read method for the class. This method is
>    # used to read (deserialize) the  given class from the store.
>    # In order to allow for changing field/attribute orders a
>    # field mapping hash is used.
>
>  bryan
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
> _______________________________________________
> Nitro-general mailing list
> Nitro-general at rubyforge.org
> http://rubyforge.org/mailman/listinfo/nitro-general
>
>


--
http://www.gmosx.com
http://www.navel.gr
http://www.nitrohq.com




More information about the Nitro-general mailing list