Skip to content

Instantly share code, notes, and snippets.

Nested Resources

This has been forked from Harry's documentation on Nested Resources.

This is for when you have Associated models. In this case, we have a Post & Comment model. This is how we associate it:

class Post < ActiveRecord::Base
  has_many :comments
end
# .../app/assets/javascripts/places_show.js.coffee
PlaceShow =
initialize: (opts) ->
#*******************************************************************************************
# INITIALIZERS
#*******************************************************************************************
isCalendarOpen = false
@.initializePanoramas()
@.initializeSlider()
@.initializeSharePlace(opts.share_title, opts.share_url, opts.share_id)