Skip to content

Instantly share code, notes, and snippets.

@ruprict
Created November 9, 2011 16:49
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 ruprict/1352047 to your computer and use it in GitHub Desktop.
Save ruprict/1352047 to your computer and use it in GitHub Desktop.
Loccasions 7
class OccasionsController < InheritedResources::Base
belongs_to :event
actions :all, :except => [:show, :index]
# Need to override this from inherited_resources
# to scope the association chain to the current_user
def begin_of_association_chain
current_user
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment