Skip to content

Instantly share code, notes, and snippets.

@lilliealbert
Last active December 14, 2015 23:29
Show Gist options
  • Save lilliealbert/5165578 to your computer and use it in GitHub Desktop.
Save lilliealbert/5165578 to your computer and use it in GitHub Desktop.
routes
Bridgetroll::Application.routes.draw do
root :to => "events#index"
devise_for :users
resources :users do
resource :profile, :only => [:edit, :update, :show]
end
resources :meetup_users, :only => [:index, :show]
resources :locations
resources :events do
resources :organizers, :only => [:index, :create, :destroy]
resources :volunteers, :only => [:index, :update]
resources :rsvps, :except => :index
resources :event_sessions, :only => [] do
resources :checkins, :only => [:index, :create, :destroy]
end
get "volunteer_emails" => "events#volunteer_emails", :on => :member
get "organize", :on => :member
end
get "/auth/:provider/callback" => "omniauths#callback"
if Rails.env.development?
get "/style_guide" => "static_pages#style_guide"
end
end
<div class="row-fluid has-giant-header">
<div class="span7">
<h1><%= @event.title %></h1>
</div>
</div>
<h2>Organizer Console</h1
<!-- <div>
<% links = [] %>
<% if @organizer %>
<% @event.event_sessions.each do |session| %>
<% links << ["Check in for #{session.name}", event_event_session_checkins_path(@event, session)] %>
<% end %>
<% links << ['Edit', edit_event_path(@event)] %>
<% end %>
<% links << ['Back', events_path] %>
<% if @organizer %>
<% links << ['Manage Organizers', event_organizers_path(@event)] %>
<% links << ['Manage Volunteers', event_volunteers_path(@event)] %>
<% links << ['Email Volunteers', volunteer_emails_event_path(@event)] %>
<% end %>
<%= render 'shared/actions', links: links %>
</div>
<div>
<% if @organizer %>
<h4>Willing to Teach: <%= teachers_count(@event.volunteer_rsvps) %></h4>
<%= partitioned_volunteer_list(@event.volunteer_rsvps, :teachers) %>
<h4>Willing to TA: <%= tas_count(@event.volunteer_rsvps) %></h4>
<%= partitioned_volunteer_list(@event.volunteer_rsvps, :tas) %>
<h4>Willing to Teach or TA: <%= teach_or_ta_count(@event.volunteer_rsvps) %></h4>
<%= partitioned_volunteer_list(@event.volunteer_rsvps, :teach_or_tas) %>
<h4>Not Interested in Teaching: <%= not_teach_or_ta_count(@event.volunteer_rsvps) %></h4>
<%= partitioned_volunteer_list(@event.volunteer_rsvps, :not_teach_or_tas) %>
<h4>All Volunteers: <%= @event.volunteer_rsvps.length %></h4>
<% end %>
</div> -->
require 'spec_helper'
describe "the organizer dashboard" do
before do
@event = create(:event, :public_email => "[email protected]")
end
visit organize_event_path(@event)
subject { page }
it.should have_content("Organizer Console")
end
@lilliealbert
Copy link
Author

rake routes output bit: http://cl.ly/image/2c3V2S3P2k10

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment