Skip to content

Instantly share code, notes, and snippets.

@dblack
Created May 31, 2011 23:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dblack/1001522 to your computer and use it in GitHub Desktop.
Save dblack/1001522 to your computer and use it in GitHub Desktop.
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