[Nitro] Og Self-Interaction Question

Taylor Bob lists at ruby-forum.com
Mon Sep 29 01:28:34 EDT 2008

Matthew B Gardner wrote:
> Hello --
>   I'm writing a game which uses Og with MySQL, and I want my website to 
> be
> able to interact with that data as well. I'm wondering about solutions 
> to
> this problem:
> Game...
> class HelpFile
>   property :name, String
>   property :body, String
>   property :viewed, Integer
> end
> Web...
> class HelpFile
>   attr_accessor :name, String
>   attr_accessor :body, String, :control => :textarea
> end
> The web class doesn't need the viewed attribute, but I'm assuming it'll 
> drop
> that attribute from the database if it isn't declared. Likewise, I'm 
> sure
> there will be web-data that I won't need in the game. I know I could 
> disable
> full evolution, but I'd like to not have to do that...especially since I
> think that's one of the best reasons to use Og with my project (changing 
> to
> add might not be too terrible). Maybe using two different declarations 
> of
> essentially the same class isn't even good practice, but the game class
> having access to web-based methods and vise-versa seems problematic to 
> me
> (not to mention the classes are in two different places).
> Does anyone have some insight on this? Implementation solutions?
> Thanks for any help -- please let me know if further clarification is 
> needed,
> Matt

It's a nice article where from i gathered a lot of useful information 
for myself.

Posted via http://www.ruby-forum.com/.

More information about the Nitro-general mailing list