dewski / json_builder

Rails provides an excellent XML Builder by default to build RSS and ATOM feeds, but nothing to help you build complex and custom JSON data structures. JSON Builder is here to help.

Home Page:http://garrettbjerkhoel.com/json_builder/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can't use Rails helpers

lagartoflojo opened this issue · comments

JSON Builder version 3.0.1
Rails version 3.1.3

Trying to use any Rails helper methods inside the .json_builder template results in errors (JSON::ParserError "unexpected token at").
For example:

# index.json.json_builder file
url root_url

I will publish a new version shortly with a fix for this, I will comment here when I do.

On Nov 28, 2011, at 8:51 PM, Hernán Schmidtreply@reply.github.com wrote:

Trying to use any Rails helper methods inside the .json_builder template results in errors ("unexpected token at").
For example:

url root_url

Reply to this email directly or view it on GitHub:
#6

Great, thanks! =)

I fixed this and pushed the gem at 3.0.2. The new addition is here.