Skip to content

Commit

Permalink
add logic to show a conference or redirect if conference is not in db
Browse files Browse the repository at this point in the history
  • Loading branch information
AlwinaO committed Feb 14, 2019
1 parent ac3668b commit 4f3bc94
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion app/controllers/conferences_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,11 @@ class ConferencesController < ApplicationController

# show route for one conference
get '/conferences/:id' do
set_conference_entry
redirect_if_not_logged_in
if !set_conference_entry
flash[:errors] = "Please select a conference from the list on the conferences page."
redirect "/conferences"
end
erb :'/conferences/show'
end

Expand Down
Binary file modified db/development.sqlite
Binary file not shown.

0 comments on commit 4f3bc94

Please sign in to comment.