This commit is contained in:
Gopesh Tulsyan 2014-06-11 10:34:56 +00:00
commit 78d5bd670d
28 changed files with 333 additions and 22 deletions

View 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

View file

@ -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