Last active
December 14, 2015 23:29
-
-
Save lilliealbert/5165578 to your computer and use it in GitHub Desktop.
routes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<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> --> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The spec produces "/Users/lchilen/Documents/railsbridge/lc_bridgetroll_fork/bridge_troll/spec/requests/event_organizer_dashboard_request_spec.rb:8:in
block in <top (required)>': undefined method
organize_event_path' for #Class:0x007fc5bbe78c30 (NoMethodError)"