2014-07-11 18:54:51 +03:00
|
|
|
module Admin
|
|
|
|
|
class EmailsController < ApplicationController
|
|
|
|
|
load_and_authorize_resource :conference, find_by: :short_title
|
|
|
|
|
load_and_authorize_resource :emails, class: EmailSettings
|
2013-01-14 08:49:49 +01:00
|
|
|
|
2014-07-11 18:54:51 +03:00
|
|
|
def update
|
|
|
|
|
@conference.email_settings.update_attributes(params[:email_settings])
|
|
|
|
|
redirect_to(admin_conference_emails_path(
|
|
|
|
|
@conference.short_title),
|
|
|
|
|
notice: 'Settings have been successfully updated.')
|
|
|
|
|
end
|
2013-01-14 08:49:49 +01:00
|
|
|
|
2014-07-11 18:54:51 +03:00
|
|
|
def index
|
|
|
|
|
@settings = @conference.email_settings
|
|
|
|
|
end
|
2013-01-14 08:49:49 +01:00
|
|
|
end
|
|
|
|
|
end
|