Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can a Rails 3 engine access models from it's parent application?

I have a Rails Engine and I want to access the parents models. Is that possible? If so, how would I do it?

like image 673
Shamoon Avatar asked Jan 13 '12 19:01

Shamoon


1 Answers

I didn't find any official documentation about it, but here's how you could still do it:

tests = ::Test.all

It'll return all tests from the parent app Test model.

like image 129
jipiboily Avatar answered Oct 17 '22 03:10

jipiboily