Class: AttendeesController

Inherits:
EventCalendar::ApplicationController show all
Includes:
ActionView::Helpers::TextHelper
Defined in:
app/controllers/attendees_controller.rb

Instance Method Summary collapse

Instance Method Details

#createObject



47
48
49
50
51
52
# File 'app/controllers/attendees_controller.rb', line 47

def create
  attendees = Participator.create!(params[:attendee])
  redirect_to(events_path, {
    :notice => "Created #{pluralize(attendees.count, 'Attendee')}!"
  })
end

#indexObject



39
40
41
# File 'app/controllers/attendees_controller.rb', line 39

def index
  # load_event in before_filter
end

#newObject

load_event in before_filter



42
43
44
45
46
# File 'app/controllers/attendees_controller.rb', line 42

def new
  @attendee = Attendee.new
  @events = Event.includes(:attendees).all
  load_all_participants
end