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.
http://garrettbjerkhoel.com/json_builder/
MIT License
243 stars 52 forks source link

Fix blankslate for ruby 1.8.7 #16

Closed andy128k closed 12 years ago

andy128k commented 12 years ago

BlankSlate hides instance_exec which is required by compile method. I've moved BlankSlate to namespace/subdir to avoid loading of another version of BlankState.

dewski commented 12 years ago

I haven't had any issues with this at all, but I can see why it shouldn't work. Do you have a failing test or example environment of how I could reproduce the issue with instance_exec being hidden?

andy128k commented 12 years ago

Unfortunately I can't share code. It is a rails 3 application. ruby-1.8.7-p352 is used.

There is nothing special in my code. Action is very simple:

def index @projects = current_user.projects end

index.json_builder:

projects @projects do |project| id project.id name project.name end

dewski commented 12 years ago

This has been pushed alongside v3.0.5.