Skip to content

first try#224

Open
AbdirizakIdris wants to merge 1 commit into
makersacademy:mainfrom
AbdirizakIdris:idris_chitter_challenge
Open

first try#224
AbdirizakIdris wants to merge 1 commit into
makersacademy:mainfrom
AbdirizakIdris:idris_chitter_challenge

Conversation

@AbdirizakIdris
Copy link
Copy Markdown

@AbdirizakIdris AbdirizakIdris commented Apr 4, 2022

Your name

Please write your full name here to make it easier to find your pull request.

User stories

Please list which user stories you've implemented (delete the ones that don't apply).

  • User story 1: "I want to see all the messages (peeps) in a browser"
  • User story 2: "I want to post a message (peep) to chitter"
  • User story 3: "I want to see the date the message was posted"
  • User story 4: "I want to see a list of peeps in reverse chronological order"
  • User story 5: "I want to filter on a specific keyword"

README checklist

Does your README contains instructions for

  • how to install,
  • how to run,
  • and how to test your code?

Here is a pill that can help you write a great README!

Comment thread Gemfile
gem 'rubocop', '1.20'
end

gem "reloader", "~> 0.1.0"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is this? Did you mean sinatra?

Comment thread Gemfile.lock
DEPENDENCIES
capybara
pg
reloader
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sinatra?

Comment thread app.rb
end

post'/peeps' do
# erb :'newpeep'
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note required?

Comment thread lib/messages.rb
connection = PG.connect(dbname: 'chitter')
result = connection.exec("SELECT * FROM peeps;")
result.map { |peeps| peeps['message'] }
end
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Keep indentation consistent

Comment thread app.rb
get '/test' do
'Test page'
end

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice restful routes

@EdwardAndress
Copy link
Copy Markdown

This is a good clear solution with good naming and it clearly demonstrates the main learning objectives around reading from and writing to a DB. The next step would be to show the date on which a Peep was created. If you had more time, would you know how to get started?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants