# Integrating with Existing Rails Apps

**URL:** <https://www.ruby-forum.com/t/integrating-with-existing-rails-apps/119833>\
**Category:** Radiant CMS\
**Created:** [November 11, 2007, 4:21am UTC](https://www.ruby-forum.com/t/integrating-with-existing-rails-apps/119833 "2007-11-11T04:21:22Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Dean](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/j/53a042/32.png) [@Jeff\_Dean](https://www.ruby-forum.com/u/Jeff_Dean)\
**Post date:** [November 11, 2007, 4:21am UTC](https://www.ruby-forum.com/t/integrating-with-existing-rails-apps/119833/1 "2007-11-11T04:21:22Z")

</div>

I’ve got a few existing sites that I’d like to add radiant to. Each  
of them has a more complicated user management setup (multiple roles/  
permissions) and lots of dynamic content.

I got going with radiant\_on\_rails and share\_layouts so I can get my  
app to look like the Radiant app, but I can’t figure out how do deal  
with migrations or overriding the default admin screens.

Migrations:

If I add migrations to RAILS\_ROOT/db/migrate, and they have numbers  
less-than the highest number in the RADIANT\_ROOT gem migrations, then  
the migrations don’t run. If they have numbers greater than the  
highest number in RADIANT\_ROOT/db/migrate, they run, but this seems  
hackish.

I realize that I can write an extension that migrates via  
db:migrate:extensions, but my apps are already fully formed, and I  
need to write several migrations to coerce the existing data into the  
new format. In that sense even if I wanted to put the code in the  
extensions, the migrations really belong in the app itself, not the  
extension, because the extension would be completely un-reusable.

For folks who use radiant\_on\_rails: how do you migrate?

Overriding Views:

I have in my app an admin/user/index.rhtml view, and I’ve added the  
RAILS\_ROOT/app/views above RADIANT\_ROOT/app/views in environment.rb.  
But when I go to the user screen, I still see the built-in view. How  
can I overwrite these in my extensions/main rails app?

Jeff
