Rails mountable engine use db schema from main application
<p>I'm creating a rails engine for an application i'm working on.</p>

<p>Basically the application is split into two sections:</p>

<ol>
<li>Private</li>
<li>Public</li>
</ol>

<p>The private site is the main application where all the admin functionality lives and the public site (engine) should be able to access the models from the private app.</p>

<p>It sounds like its in reverse to me but this is what the spec calls for.</p>

<p>I know in general you would access an engine model in your main app as such:</p>

<p>EngineName::Model</p>

<p>How would I access the main application inside the engine?</p>

<p>Example:</p>

<p>A private user would go to foo.bar/videos/new and create a new video.</p>

<p>A public user would go to foo.bar/public/videos and have access to those same videos.</p>