Last active
February 9, 2021 19:35
-
-
Save lolaodelola/a2befc5e3c2ec883202344bf8e502584 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class TweetController | |
require 'tweet' | |
get '/new_tweet' do | |
# display html page with form | |
end | |
post '/create_tweet' do | |
content_string = request[:params[:content]] | |
if Tweet.create(content_string) | |
# show success flash notice to user | |
else | |
# show failure flash notice to user | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment