render partial in json resonse

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

render partial in json resonse

fugee ohu
error:
ActionView::Template::Error (Missing partial transactions/_receipt, application/_receipt with {:locale=>[:en], :formats=>[:js, :html, :text, :css, :ics, :csv, :vcf, :png, :jpeg, :gif, :bmp, :tiff, :svg, :mpeg, :xml, :rss, :atom, :yaml, :multipart_form, :url_encoded_form, :json, :pdf, :zip, :gzip], :variants=>[], :handlers=>[:raw, :erb, :html, :builder, :ruby, :coffee, :jbuilder]}. Searched in:

the create action in transactions_controller.rb:
...
if @transaction.save
        format.json { render partial: 'receipt', status: :created, location: @parlor }
...
create.js.erb:
$('#drop_in_container').html('<%= j render partial: 'receipt', locals: @transaction %>')

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/c8aa93fa-f0be-4262-8caa-45d71f1a8568%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.