This file contains 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
# this is the easiest way to use partials from model I could find so far | |
class Entry < AR::Base | |
def as_json | |
context = ApplicationController.new.view_context | |
context.render('/api/entries/entry.json', entry: self) | |
end | |
end |