Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # request json
- # controller action
- def new
- respond_to do |format|
- format.json do
- render :template => "thingy"
- end
- end
- end
- # thingy.json.erb THIS DOESN"T WORK if people/things.html.erb exists
- <%=
- {
- :content => render_to_string(:partial => "people/things")
- }
- %>
- # thingy.json.erb THIS WORKS
- <%=
- {
- :content => render_to_string(:partial => "people/things.html.erb")
- }
- %>
Add Comment
Please, Sign In to add comment