3

I've recently started working on an app that needs heavy scripting client-side and have been looking at integrating Rails with JavascriptMVC. found out that the folks at JupiterJS are doing the same, which is great, but,

I've been searching on google, on javascriptMVC's forum and i still couldn't find a definite answer for this - where do i put all the javascriptMVC folders & files in the Rails file structure?

I was initially going to put all the new javascriptMVC files in /public/javascripts/ - but I was a little worried of the security issues it might pose - all the test files, docs and scripts will be available for access by the whole world. PLUS, the instructions in javascriptMVC says:

"PRO TIP: Unzip these files as high in your apps folder structure as possible (i.e. don't put them under a javascriptmvc folder in your public directory)."

so now I'm not sure. any ideas on how a good rails + javascriptMVC folder structure would look like and do I need to add any new paths to the Rails environment to allow it to work outside of public/ ?

1 Answers1

1

For JMVC questions, Please ask questions on our forum. You're lucky I check stackoverflow.

There isn't really a security issue if you're using a standard rails server. However, if you want to be safe, on your production machine, you only have to push out steal/steal.js and your apps production.js and production.css file.

Justin Meyer
  • 1,677
  • 13
  • 15
  • sorry Justin I'm just confirming what you said, so does this mean that i should just git submodule all the files into public/javascriptmvc? what does the PRO TIP on your site mean then? and you're right, i should've used your forum. will do that for my other questions :) – Asyraf Rahman Mar 14 '11 at 01:03
  • I actually add them as submodules to the public folder. JMVC can also build your CSS. And I organize images by widget I'm building. – Justin Meyer Mar 14 '11 at 15:41