GithubHelp home page GithubHelp logo

dkennell / rails-paperclip-lab-v-000 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from learn-co-students/rails-paperclip-lab-v-000

0.0 1.0 0.0 2.16 MB

License: Other

Ruby 83.74% CSS 1.67% HTML 14.58%

rails-paperclip-lab-v-000's Introduction

Uploading Images With Paperclip Lab

Objectives

  1. Use Paperclip to add an image attachment to a model.
  2. Set default images when avatars aren't there.
  3. Post-process avatars to create thumbnails of avatars.

Song Library

In this lab, we're going to augment our song library to upload album cover art and display them with songs.

When we list songs, we want to show an album cover thumbnail, but when we're on the song's page, we'd like to see the full-size image. We also want it to still look good if we haven't uploaded cover art yet.

Instructions

The base models, controllers, views and other files have been provided. There's seed data to get you started, and there are tests for the lab in the spec directory.

Since we are adding new features to an existing application, there will already be some passing tests. Part of your job is to make sure they're still passing after you're done!

  1. Use Paperclip to add an album_cover attachment to songs. Create a :thumb style for image thumbnails, set a default image of your choosing, and set up the new and edit song pages to do the image upload.
  2. Display the thumbnail image with the song in the song index, and display the full-size image on the song show page.
  3. Make sure all tests pass then do this:

Prancing Homer

rails-paperclip-lab-v-000's People

Contributors

scottcreynolds avatar annjohn avatar blake41 avatar dkennell avatar

Watchers

James Cloos 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.