Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed 'Missing Partial' problem in rails3 #44 #80

Merged
merged 1 commit into from
Sep 12, 2013

Conversation

MhdSyrwan
Copy link
Contributor

Fixes the rendering problem listed in issue #44 (comment)

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 rails/rails#4841
The partial always falls back to the response format (which is json in sync requests)

Solution:
Solved according to -this StackOverflow question- this way:

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

@chrismccord chrismccord merged commit f8ef8e3 into chrismccord:master Sep 12, 2013
@chrismccord
Copy link
Owner

Merged in master and should be included in a minor gem release soon. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants