Created
February 17, 2010 08:45
-
-
Save Mikr0Tik/306435 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
page.replace_html 'people', :partial => 'index' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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