# Libraries referencing models?

**URL:** <https://www.ruby-forum.com/t/libraries-referencing-models/106251>\
**Category:** Rails\
**Created:** [June 7, 2007, 9:12pm UTC](https://www.ruby-forum.com/t/libraries-referencing-models/106251 "2007-06-07T21:12:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![isopaleocopria](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/i/bb73d2/32.png) [@isopaleocopria](https://www.ruby-forum.com/u/isopaleocopria)\
**Post date:** [June 7, 2007, 9:12pm UTC](https://www.ruby-forum.com/t/libraries-referencing-models/106251/1 "2007-06-07T21:12:22Z")

</div>

I have been perusing the source code for instiki (http://  
[Instiki Casino - Premium Casino Blog Listing - Instiki Casino](http://www.instiki.org/show/HomePage)) and noticed that in some of the library  
classes, there are references to model classes. And of course model  
classes refer to library classes.

When deployed in production mode, everything works, but if you deploy  
instiki in development mode, a superclass mismatch error occurs.

It strikes me that this tight coupling is a bad design: models should  
refer to libraries, but not vice versa. Otherwise, there is no  
separation of concern.
