osem-fcy/app/controllers/admin/venue_controller.rb

28 lines
817 B
Ruby
Raw Normal View History

2014-08-06 21:14:00 +03:00
module Admin
class VenueController < ApplicationController
before_filter :verify_organizer
2013-01-07 09:04:09 +01:00
2014-08-06 21:14:00 +03:00
def index
end
2013-01-07 09:04:09 +01:00
2014-08-06 21:14:00 +03:00
def update
@venue = @conference.venue
@venue.assign_attributes(params[:venue])
2014-08-12 16:04:24 +05:30
send_mail = @venue.venue_notify?(@conference)
2014-08-06 21:14:00 +03:00
if @venue.update_attributes(params[:venue])
2014-08-12 16:04:24 +05:30
Mailbot.delay.send_email_on_venue_update(@conference) if send_mail
2014-08-06 21:14:00 +03:00
redirect_to(admin_conference_venue_info_path(conference_id: @conference.short_title),
notice: 'Venue was successfully updated.')
else
redirect_to(admin_conference_venue_info_path(conference_id: @conference.short_title),
notice: 'Venue Updation Failed!')
end
2014-06-13 22:50:46 +05:30
end
2013-01-07 09:04:09 +01:00
2014-08-06 21:14:00 +03:00
def show
@venue = @conference.venue
render :venue_info
end
2013-01-07 09:04:09 +01:00
end
end