# Fusing rails app with Radiant as extension?

**URL:** <https://www.ruby-forum.com/t/fusing-rails-app-with-radiant-as-extension/90589>\
**Category:** Radiant CMS\
**Created:** [March 30, 2007, 4:17am UTC](https://www.ruby-forum.com/t/fusing-rails-app-with-radiant-as-extension/90589 "2007-03-30T04:17:29Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![stefan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@stefan](https://www.ruby-forum.com/u/stefan)\
**Post date:** [March 30, 2007, 4:17am UTC](https://www.ruby-forum.com/t/fusing-rails-app-with-radiant-as-extension/90589/1 "2007-03-30T04:17:29Z")

</div>

I’m new to the radiant/rails scene, and I’m learning a whole lot. I love  
radiant, but one of the things I want to do is to fuse one of my current  
rails applications with radiant.

I’m guessing extensions would be the way to go? Or looking at the code  
should I just customize radiant to have another tab that could manage my  
application?

My application is fairly simple. Just a simple listing database. It has  
6 tables, that I think could live easily in the same database as  
Radiant’s?

Am I going about this the wrong way? Has anyone already done this and  
have any tips?

I just installed RC2, as for my situation is better than using the  
mental version via svn.

Thanks a lot for the help! This looks like an awesome forum, and hope to  
be here a while!

- Stefan

---

<div class="post-metadata">

**Author:** ![stefan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@stefan](https://www.ruby-forum.com/u/stefan)\
**Post date:** [March 30, 2007, 8:50am UTC](https://www.ruby-forum.com/t/fusing-rails-app-with-radiant-as-extension/90589/2 "2007-03-30T08:50:33Z")

</div>

I guess my question is simpler now, kinda.

I read a few places that with the mental branch, and now RC2, fusing  
together your own app with radiant would be easier. Since there isn’t a  
whole lot of documentation on it, and I guess since I don’t feel like  
delving into the source of Radiant, perhaps I could get an answer here?

So… I would create (or in my case copy) my MVC’s over, and then  
integrate it into Radiant via an extension which can also put a tab into  
the admin interface? What else would need to be done? I guess if I  
wanted to access my data in layouts (whic I do) I would need to define  
my own Radius tags, right, or does extensions make this easier somehow?

I’m all confused, on where, how, and mostly what extensions actually do,  
and what normal coding still needs to be done. Perhaps it’ll all come to  
me, and I should just try out and do this, but if at all possible, I  
like to have a plan set in place, and documentation, or any reference  
from people who have already done this would and have done/do.

Thanks for the help. it is much appreciated!

- Stefan

---

<div class="post-metadata">

**Author:** ![stefan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@stefan](https://www.ruby-forum.com/u/stefan)\
**Post date:** [March 30, 2007, 3:29pm UTC](https://www.ruby-forum.com/t/fusing-rails-app-with-radiant-as-extension/90589/3 "2007-03-30T15:29:34Z")

</div>

You’re on the right track in your second paragraph. Nothing says that  
you have to use Radiant for displaying information to the end user  
(via Radius tags), but that is definitely the conventional way.

Look at the presentation I gave Tuesday for some more info about  
general extension development:  
[http://seancribbs.com/customizing-radiant](http://seancribbs.com/customizing-radiant)

For creating your own global Radius tags with mental/RC2, look up the  
post on the Radiant weblog about time-sensitive content.

Sean

---

<div class="post-metadata">

**Author:** ![stefan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@stefan](https://www.ruby-forum.com/u/stefan)\
**Post date:** [March 31, 2007, 2:50am UTC](https://www.ruby-forum.com/t/fusing-rails-app-with-radiant-as-extension/90589/4 "2007-03-31T02:50:38Z")

</div>

Awesome. Thanks. That helps a lot… but one question.

In RC2, where do I put my MVCs? The app directory is missing. Now that  
just got me all confused.

---

<div class="post-metadata">

**Author:** ![stefan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@stefan](https://www.ruby-forum.com/u/stefan)\
**Post date:** [March 31, 2007, 2:52am UTC](https://www.ruby-forum.com/t/fusing-rails-app-with-radiant-as-extension/90589/5 "2007-03-31T02:52:28Z")

</div>

Stefan wrote:

> Awesome. Thanks. That helps a lot… but one question.
> 
> In RC2, where do I put my MVCs? The app directory is missing. Now that  
> just got me all confused.

Hmm is it because radiant is a gem? I’m guessing so. I’m still confused  
though. Would it be better for me to move to MENTAL in order to do what  
I want to do? or can I use RC2 and still customize it. I’m really  
confused now.

Thanks,

Stefan

---

<div class="post-metadata">

**Author:** ![stefan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@stefan](https://www.ruby-forum.com/u/stefan)\
**Post date:** [March 31, 2007, 3:04am UTC](https://www.ruby-forum.com/t/fusing-rails-app-with-radiant-as-extension/90589/6 "2007-03-31T03:04:18Z")

</div>

Okay, since I like to respond to my own questions, let’s do it some  
more!

haha. Since RC2 is a gem, the app and lib folders are there right? Okay,  
so I can create an extension with the help of this page:  
[http://dev.radiantcms.org/radiant/wiki/HowToWriteAnExtension](http://dev.radiantcms.org/radiant/wiki/HowToWriteAnExtension)

but now where do I put my models, views, and controllers. Will it work  
if I just put them into a new directory of app? That’s where I’m lost.  
right now.

---

<div class="post-metadata">

**Author:** ![stefan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@stefan](https://www.ruby-forum.com/u/stefan)\
**Post date:** [March 31, 2007, 3:47am UTC](https://www.ruby-forum.com/t/fusing-rails-app-with-radiant-as-extension/90589/7 "2007-03-31T03:47:30Z")

</div>

Stefan wrote:

> but now where do I put my models, views, and controllers. Will it work  
> if I just put them into a new directory of app? That’s where I’m lost.  
> right now.

You put them in the app directory of the extension. Extensions are self  
contained mini rails apps.

–  
John L.  
[http://wiseheartdesign.com](http://wiseheartdesign.com)

---

<div class="post-metadata">

**Author:** ![stefan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@stefan](https://www.ruby-forum.com/u/stefan)\
**Post date:** [April 3, 2007, 3:19am UTC](https://www.ruby-forum.com/t/fusing-rails-app-with-radiant-as-extension/90589/8 "2007-04-03T03:19:01Z")

</div>

Yeah, I realized that when I started playing with it and the extensions  
more.

That’s pretty freakin’ awesome!

Thanks a lot John, Sean, and all the Radiant developers.

I’ll let you know how the project comes along. It’ll be a pretty  
largely visited site in my area, probably reaching 1 million page views  
in its first month…we hope! 🙂

Stefan Gomez  
stefangomez(at)[yahoo.com](http://yahoo.com)

---

<div class="post-metadata">

**Author:** ![stefan](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/s/bbce88/32.png) [@stefan](https://www.ruby-forum.com/u/stefan)\
**Post date:** [April 3, 2007, 5:19am UTC](https://www.ruby-forum.com/t/fusing-rails-app-with-radiant-as-extension/90589/9 "2007-04-03T05:19:14Z")

</div>

Definitely an odd question:

Can you directly link snippets from outside Radiant?

I want to use my snippets to wrap phpBB and allow most modification of  
phpBB through Radiant and a uniform look. Any ideas?

Thanks!  
Andrew
