Giter VIP home page Giter VIP logo

gitb_articles_with_images_test's Introduction

Articles with Images

This repository contains a subset of a Ruby on Rails app. There are 3 models. Articles are a type of Posting. Other types of Postings include Questions and ProductReviews. Postings have a body attribute. The contents of the Posting is stored as raw html. Some Postings have images embedded within the text of the Posting, in the form of an <img> tag wrapped in <figure> tags.

The repo also contains one view file and one spec file.

The Task

Throughout the site, "posting snippets" are displayed, with links to read the full Posting. The product manager has decided that when an Article contains an image, its snippet should display the image above the snippet body. If an Article contains multiple images, only the first image should be displayed.

Your Task

You are the developer assigned to review the code that was created for this feature. As you review the code, try to answer the following questions:

  • Does the implementation achieve the desired effect?
  • What are the shortcomings of this implementation?
  • Does the code adhere to best practices?
  • How might you implement this differently?

RSpec

The code includes a unit test, which passes. What is wrong with this unit test? How could it be improved?

Instructions

Fork this repository. You can either add comments to the existing code explaining what is wrong and/or what you would change and why. Or you can rewrite the feature, highlighting in the comments what was problematic with the original implementation and providing justification for your decisions. Please put a link to your public repository into the answer section of the question.

gitb_articles_with_images_test's People

Contributors

naftaliatpeerspot avatar golfer avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.