Skip to content

Instantly share code, notes, and snippets.

@elomar
Created May 21, 2009 02:37
Show Gist options
  • Select an option

  • Save elomar/115231 to your computer and use it in GitHub Desktop.

Select an option

Save elomar/115231 to your computer and use it in GitHub Desktop.
class EventsController < ResourceController::Base
before_filter :require_user, :except => [:index, :show]
before_filter :require_organizer, :only => [:edit, :update, :destroy]
create.before do
object.organizer = current_user
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment