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

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

Hi Scott,

On 11/25/06, Scott B. [email protected] wrote:

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://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. :smiley:

Thanks for the link!

:smiley:

Peter

On 11/25/06, Peter M. [email protected] 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://svn.danwebb.net/external/rails/plugins/minus_mor/trunk/


Scott B.
Electro Interactive, Inc.
Office: 813-333-5508
http://www.ElectroInteractive.com

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs