Rails - Rendering a Partial without having to use "_" in front of the filename?

Posted by bluedevil2k on Stack Overflow See other posts from Stack Overflow or by bluedevil2k
Published on 2012-07-09T14:56:09Z Indexed on 2012/07/09 15:15 UTC
Read the original article Hit count: 151

How do I render a partial without having to supply the "_" in front of the file name? Is there a parameter I can call to not use it?

This problem popped up using RABL and Backbone - using RABL requires me to have a file in my views like "index.json.rabl". But, when I use embed the JSON right on the page load (as is usual with Backbone), I'm required to call the file "index.json.rabl". These 2 files are the exact same thing, just required to have different names. I'm looking to use just 1 file, "index.json.rabl" and force the render() function to look for that file name, without the "".

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about ruby-on-rails-3