chrismccord/sync — pull request #80 by MhdSyrwan (2013-09-02 23:20:21+00:00)
Title: Fixed 'Missing Partial' problem in rails3 #44

Fixes the rendering problem listed in issue https://github.com/chrismccord/sync/issues/44#issuecomment-18639676

```
ActionView::MissingTemplate - Missing partial sync/memo_replies/refetch/memo_reply with {:locale=>[:en], :formats=>[:json], :handlers=>[:erb, :builder, :arb, :slim, :coffee]}.
```

**Cause:**
because an issue in rails 3 https://github.com/rails/rails/issues/4841
The partial always falls back to the response format (which is `json` in sync requests)

**Solution:**
Solved according to -[this StackOverflow question] [1]- this way:
[1]: http://stackoverflow.com/questions/339130/how-do-i-render-a-partial-of-a-different-format-in-rails

```ruby
def show
render json: {
html: with_format(:html){ @partial.render_to_string }
}
end
```