Created

Embed URL

HTTPS clone URL

SSH clone URL

You can clone with HTTPS or SSH.

Download Gist
View gist:1001522
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.