# Adding a different template (.fjs) and connecting with respo

**URL:** <https://www.ruby-forum.com/t/adding-a-different-template-fjs-and-connecting-with-respo/77269>\
**Category:** Rails\
**Created:** [November 25, 2006, 7:39pm UTC](https://www.ruby-forum.com/t/adding-a-different-template-fjs-and-connecting-with-respo/77269 "2006-11-25T19:39:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dracos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dracos](https://www.ruby-forum.com/u/dracos)\
**Post date:** [November 25, 2006, 7:39pm UTC](https://www.ruby-forum.com/t/adding-a-different-template-fjs-and-connecting-with-respo/77269/1 "2006-11-25T19:39:34Z")

</div>

Hi,

I am writing a new JavaScript templating system for Rails as a plugin.  
I want to use the extension “.fjs”. When a user “wants.js” in a  
respond\_to block I would first like to look for a .fjs file and render  
it with my new templating system. If an .fjs file is not present then  
look for .rjs file and render with the rjs templating system.

Is this easily possible through the Rails API or is this going to be  
hacking the Rails core?

Any pointers how to do this or get started would be greatly appreciated.

Thank you,  
Peter

---

<div class="post-metadata">

**Author:** ![dracos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dracos](https://www.ruby-forum.com/u/dracos)\
**Post date:** [November 26, 2006, 7:36am UTC](https://www.ruby-forum.com/t/adding-a-different-template-fjs-and-connecting-with-respo/77269/2 "2006-11-26T07:36:19Z")

</div>

Hi Scott,

On 11/25/06, Scott B. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Dan W. created MinusMOR, which does this with the .ejs extension. I bet  
> that would be a good place to start.
> 
> [danwebb.net - MinusMOR Released!](http://www.danwebb.net/2006/11/24/minusmor-released)  
> [http://svn.danwebb.net/external/rails/plugins/minus\_mor/trunk/](http://svn.danwebb.net/external/rails/plugins/minus_mor/trunk/)

I wanted to write exactly what MinusMOR does (i just picked on letter  
away in the extension). Wrapping JavaScript in Ruby seems like a bad  
idea after using RJS for even a short time. I hope a bunch of Railers  
jump on the MInusMOR bandwagon. Great stuff!

This was literally the next project on my list. I am happy it already  
has been done. 😃

Thanks for the link!

😃

Peter

---

<div class="post-metadata">

**Author:** ![dracos](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/ea666f/32.png) [@dracos](https://www.ruby-forum.com/u/dracos)\
**Post date:** [November 26, 2006, 6:40am UTC](https://www.ruby-forum.com/t/adding-a-different-template-fjs-and-connecting-with-respo/77269/3 "2006-11-26T06:40:17Z")

</div>

On 11/25/06, Peter M. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Is this easily possible through the Rails API or is this going to be  
> hacking the Rails core?
> 
> Any pointers how to do this or get started would be greatly appreciated.
> 
> Thank you,  
> Peter

Dan W. created MinusMOR, which does this with the .ejs extension. I  
bet  
that would be a good place to start.

[http://www.danwebb.net/2006/11/24/minusmor-released](http://www.danwebb.net/2006/11/24/minusmor-released)  
[http://svn.danwebb.net/external/rails/plugins/minus\_mor/trunk/](http://svn.danwebb.net/external/rails/plugins/minus_mor/trunk/)

–  
Scott B.  
Electro Interactive, Inc.  
Office: 813-333-5508

> **[Electro Interactive - Web Development. Ruby on Rails. Web Standards.](http://www.electrointeractive.com)**
>
> Electro Interactive is a full service new media design and development company.
