added views for public view on splashpage,venue_edit,venue

This commit is contained in:
Shriyansh 2016-04-09 02:52:06 +05:30
parent 3bcdbe7469
commit 0ca19ea67a
3 changed files with 26 additions and 11 deletions

View file

@ -9,10 +9,10 @@ module Admin
authorize! :create, @commercial
if @commercial.save
redirect_to edit_admin_conference_venue_path,
redirect_to admin_conference_venue_path,
notice: 'Commercial was successfully created.'
else
redirect_to edit_admin_conference_venue_path,
redirect_to admin_conference_venue_path,
error: 'An error prohibited this Commercial from being saved: '\
"#{@commercial.errors.full_messages.join('. ')}."
@ -21,10 +21,10 @@ module Admin
def update
if @commercial.update(commercial_params)
redirect_to edit_admin_conference_venue_path,
redirect_to admin_conference_venue_path,
notice: 'Commercial was successfully updated.'
else
redirect_to edit_admin_conference_venue_path,
redirect_to admin_conference_venue_path,
error: 'An error prohibited this Commercial from being saved: '\
"#{@commercial.errors.full_messages.join('. ')}."
end
@ -32,7 +32,7 @@ module Admin
def destroy
@commercial.destroy
redirect_to edit_admin_conference_venue_path, notice: 'Commercial was successfully destroyed.'
redirect_to admin_conference_venue_path, notice: 'Commercial was successfully destroyed.'
end
def render_commercial