Skip to content

Instantly share code, notes, and snippets.

@dmonopoly
Created July 22, 2011 22:38
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 dmonopoly/1100596 to your computer and use it in GitHub Desktop.
Save dmonopoly/1100596 to your computer and use it in GitHub Desktop.
Coffeebeans; trying to get app/views/restaurants/show.js.coffee to work; the alert doesn't appear
# 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?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment