Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Camran Hansen Shopify Eng Assessment #306

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

camranhansen
Copy link

@camranhansen camranhansen commented Jan 30, 2024

👋Hello Shopify devs! The following is a summary of the changes done in this PR. If any points require further clarification, please don't hesitate to reach out or leave a comment below.

Changelog

  • Implemented basic CRUD actions specified in article_test.rb
  • Added constraints and default values to Article model along with corresponding tests
  • Added search functionality and additional tests to further define edge case behaviour (empty search)
  • Added pagination using [kaminari](https://github.com/kaminari/kaminari) to ensure performance in cases with a large number of articles.
  • Cleaned up UI generated from scaffold

Core Assumptions:

The following assumptions were made during development.

  • content and title are mandatory for an Article
  • content must be at least 10 characters long
  • If author is not specified for an article, assume anonymous author
  • If date is not specified for an article, assume current date
  • search matches to any of content, title , and author, and an empty/blank search returns all articles

Testing Instructions

After cloning this repository:

  • Install required gems with bundle install
  • Run rake db:migrate to set up the database
  • Run rake test to run unit tests
  • Run bin/rails server to start a local development server

UI screenshots

Article Creation

image

Pagination using [kaminari](https://github.com/kaminari/kaminari)

image

image

Search

image

Search & Pagination

image

Editing & Destroying an article

image

image

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.

None yet

1 participant