Created
July 13, 2010 01:00
-
-
Save cbrumelle/473302 to your computer and use it in GitHub Desktop.
Add 'to_json' method to Sequel datasets
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Monkey patch/hack for adding in a to_json for Sequel datasets | |
# See http://sequel.rubyforge.org | |
class Sequel::Dataset | |
def to_json | |
naked.all.to_json #Note: 'naked' converts dataset to plain hash... | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment