Merge c1063645da into 17427c88fe
This commit is contained in:
commit
78d5bd670d
28 changed files with 333 additions and 22 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
|
||||
|
|
@ -6,13 +6,13 @@ class Admin::VenueController < ApplicationController
|
|||
|
||||
def update
|
||||
@venue = @conference.venue
|
||||
venue_params = params[:venue]
|
||||
@venue.name = venue_params[:name]
|
||||
@venue.address= venue_params[:address]
|
||||
@venue.website = venue_params[:website]
|
||||
@venue.description = venue_params[:description]
|
||||
@venue.save
|
||||
redirect_to(admin_conference_venue_info_path(:conference_id => @conference.short_title), :notice => 'Venue was successfully updated.')
|
||||
if @venue.update_attributes!(params[:venue])
|
||||
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
|
||||
end
|
||||
|
||||
def show
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue