public
Last active

  • Download Gist
gistfile1.txt
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.