public
Created

Coffeebeans; trying to get app/views/restaurants/show.js.coffee to work; the alert doesn't appear

  • Download Gist
help with show.js.coffee
CoffeeScript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
# Controller
class RestaurantsController < ApplicationController
def show
@restaurant = Restaurant.find(params[:id])
respond_to do |format|
format.html # show.html.erb
format.js # show.js.coffee
end
end
end
 
# restaurants/show.html.erb
<%= link_to "Breakfast", @restaurant, :remote => true, :id => "breakfast_filter" %>
 
# restaurants/show.js.coffee
alert("here we are");
 
Why is the show.js.coffee file never reached?

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.