Adds lodgings controller and view
This commit is contained in:
parent
029281a9ae
commit
e494192ad2
8 changed files with 111 additions and 1 deletions
23
app/controllers/admin/lodgings_controller.rb
Normal file
23
app/controllers/admin/lodgings_controller.rb
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
module Admin
|
||||
class LodgingsController < ApplicationController
|
||||
before_filter :verify_organizer
|
||||
|
||||
def index
|
||||
@venue = @conference.venue
|
||||
end
|
||||
|
||||
def show
|
||||
end
|
||||
|
||||
def update
|
||||
@venue = @conference.venue
|
||||
if @venue.update_attributes(params[:venue])
|
||||
redirect_to(admin_conference_lodgings_path(conference_id: @conference.short_title),
|
||||
notice: 'Lodgings were successfully updated.')
|
||||
else
|
||||
redirect_to(admin_conference_lodgings_path(conference_id: @conference.short_title),
|
||||
notice: 'Lodgings Updation Failed!')
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue