Skip to content

Instantly share code, notes, and snippets.

@Mikr0Tik
Created February 17, 2010 08:45
Show Gist options
  • Save Mikr0Tik/306435 to your computer and use it in GitHub Desktop.
Save Mikr0Tik/306435 to your computer and use it in GitHub Desktop.
the issue i have: in the js.rjs i have to render a partial '_index',
but i wish i could render a 'index.html.erb',
like page.replace_html 'people', :template => 'index'
(but it ends up in a "Element.update("people", null);", thought the template is not empty)
page.replace_html 'people', :partial => 'index'
class PeopleController < ApplicationController
def index
@people = Person.active.all
respond_to do |format|
format.js
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment