So here’s my controller:
class ScriptController < ApplicationController
respond_to :js
def show
puts 'here'
@client_id = params[:id]
respond_with @client_id
end
end
I have a file called in app/views/script/show.js.coffee but it doesn’t load when I go to the show page. I’m using the coffeebeans gem: Loading .coffee files via a view in Rails
Any help?
EDIT: Added Error
Template is missing
Missing template good_comments/script/show, good_comments/application/show with {:handlers=>[:erb, :builder], :formats=>[:js, :html], :locale=>[:en, :en]}. Searched in: * “/Users/shamoon/Sites/good_comments/spec/dummy/app/views” * “/Users/shamoon/Sites/good_comments/app/views”
Don’t use CoffeeBeans,
coffee-railshandles rendering of coffeescript out-of-box.I render coffeescripts like this: