Created
May 31, 2011 23:58
-
-
Save dblack/1001522 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
Why does the app always take the HTML/index.html.erb path when the link is clicked? | |
Does index.js.erb not work any more? | |
# in controller | |
def index | |
@page = Page.find(params[:page_id]) | |
@ideas = @page.ideas | |
respond_to do |format| | |
format.js | |
format.html | |
end | |
end | |
# in view | |
<%= link_to "Show ideas", scratchpad_page_ideas_path(@scratchpad, page), | |
:remote => true %> | |
# files | |
index.html.erb index.js.erb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment