# Combining Radiant with a Rails App

**URL:** <https://www.ruby-forum.com/t/combining-radiant-with-a-rails-app/96661>\
**Category:** Radiant CMS\
**Created:** [June 30, 2006, 4:19pm UTC](https://www.ruby-forum.com/t/combining-radiant-with-a-rails-app/96661 "2006-06-30T16:19:09Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Harvey\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/13edae/32.png) [@Harvey\_B](https://www.ruby-forum.com/u/Harvey_B)\
**Post date:** [June 30, 2006, 4:19pm UTC](https://www.ruby-forum.com/t/combining-radiant-with-a-rails-app/96661/1 "2006-06-30T16:19:09Z")

</div>

Hi Guys,

I’ve only been using Radiant for a couple of days but I am really liking  
it.  
I wonder if somebody could offer me some advise about integrating  
another  
rails application into Radiant.

Here’s the scenario. I am going to have the usual public CMS website  
but in  
addition I need to create an Extranet which will offer various services.  
The first service is really a simple web database which contains lots of  
information about Nursing Homes. So I will have the usual CRUD  
facilities.

Here’s the thing. I want to keep DRY by making use of Radiant’s layout  
facilities, user management, tags (in particular breadcrumbs) and  
snippets.  
I think what I am after is the ability to have a behaviour which can  
redirect to a my own controller and then render my own view inside a  
Radiant  
page.

Has anybody down anything like this?

Thanks in advance  
Harvey

This e-mail has been scanned for all viruses by MessageLabs.

---

<div class="post-metadata">

**Author:** ![Harvey\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/13edae/32.png) [@Harvey\_B](https://www.ruby-forum.com/u/Harvey_B)\
**Post date:** [July 7, 2006, 1:33am UTC](https://www.ruby-forum.com/t/combining-radiant-with-a-rails-app/96661/2 "2006-07-07T01:33:29Z")

</div>

Harvey B. wrote:

> Here’s the thing. I want to keep DRY by making use of Radiant’s layout  
> facilities, user management, tags (in particular breadcrumbs) and  
> snippets.

I’m doing something broadly similar. I have a collection of Rails  
applications (RForum, Instiki, Typo etc.) all sharing some layout  
fragments with a global stylesheet defining the bulk of visual  
properties and custom stylesheets to cope with the quirks and different  
class/ID names used in the different application RHTML files. Some  
customisation of RHTML files was required in addition to this.

For less dynamic pages, Radiant appears to be just what I need - a small  
team wants to edit effectively static content. Since Radiant has the  
concept of layouts and snippets, things like the shared header, footer  
and static sidebar content should probably be defined as snippets within  
Radiant. What I’d like to do is have these end up exported into the  
filesystem when they are changed, so that while Radiant keeps its own  
copy in the database, a synchronised copy appears in a shared location  
(accessed primarily by symlinks currently) so other parts of the site  
maintain layout. To do this I believe I will have to modify Radiant to  
save snippets to the filesystem as well as into the database when  
updated or created anew.

This may be an approach you could use - turn the idea of incorporating  
your Views into Radiant on its head, and instead use exported bits of  
Radiant content in your other Views.

---

<div class="post-metadata">

**Author:** ![Harvey\_B](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/h/13edae/32.png) [@Harvey\_B](https://www.ruby-forum.com/u/Harvey_B)\
**Post date:** [July 9, 2006, 7:18pm UTC](https://www.ruby-forum.com/t/combining-radiant-with-a-rails-app/96661/3 "2006-07-09T19:18:47Z")

</div>

Andrew,

Thanks for your suggestion. The more I thought about my original idea  
the  
less I liked. It just seemed to get more complicated which I definitely  
wanted to avoid. My existing rails app uses a different caching method  
and  
lots of Ajax.

I now think it would be better to keep the CMS and my app separate. I  
think  
in the first instance, I am just going to end up with duplicate layout  
and  
just share the main CSS file.

Thanks for your input, it has given me something to think about.

Harvey

On 7/7/06 00:33, “Andrew H.” [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> class/ID names used in the different application RHTML files. Some  
> maintain layout. To do this I believe I will have to modify Radiant to  
> save snippets to the filesystem as well as into the database when  
> updated or created anew.
> 
> This may be an approach you could use - turn the idea of incorporating  
> your Views into Radiant on its head, and instead use exported bits of  
> Radiant content in your other Views.

This e-mail has been scanned for all viruses by MessageLabs.
