Giter Site home page Giter Site logo

youre-do's Introduction

##LAB2

  1. Creation of static pages for our social network: home and contact
  • rails generate controller Pages home contact
  1. Creation of the "About" page, by editing the files:
  • config/routes.rb

  • app/controllers/pages_controller.rb

  1. Adding title to HTML files: "Room5T | Page name"
  • by defining a @title variable in app/controllers/pages_controller.rb

  • by including it in the title present in app/views/layouts/application.html.erb

  1. Create an helper to only show the title "Room5T" if the @title variable is nil

##LAB5 5) Improve the helper, by using symbols instead of instance variables

  1. Add the Bootstrap CSS Framework:
  • update the gemfile to download and install bootstrap-sass

  • bundle install

  • create a new file for custom CSS, such as custom.css.scss; fill its content with @import "bootstrap";

  • add some partials to separate logical units

  • add custom Sassy CSS

##LAB6 7) Add routes for existing pages and delete or rename the page public/index.html

  1. Create, stylish and add proper named routes to:
  • the help page

  • a User controller, with new as an action (and \signup as relative URL)

##LAB7 9) Install some useful gems: annotate and bcrypt-ruby

  1. Generate a User model with two attributes, name and email:
  • rails generate model User name:string email:string
  1. Migrate the model to a DB:
  • bundle exec rake db:migrate
  1. [If you are using Rails version 3.2.1 or earlier] Add the line attr_accessible :name, :email to the User model (the user.rb file)

  2. Add some validations for the model attributes

  3. Assure the uniqueness to the email attribute, by acting on the DB

##LAB8 15) Create a migration for the password digest (then, migrate it):

  • rails generate migration add_password_digest_to_users password_digest:string
  1. Add password and password_confirmation to user's model

  2. Create a new user in the DB (probably this change is not under version control)

##LAB9 18) Show some useful debug information in the web pages by adding the debug method to application.html.erb

  • add some custom stylesheet rules for debug purposes
  1. Add a route for handling the User resource:
  • resources :users
  1. Add a new page for showing a user (otherwise, the added route does not show anything...): show.html.erb
  • add some information to the page and some stylesheet rules
  1. Add an helper to connect with the Gravatar service

  2. Add the sign up form by using the helper method form_for

  • add some stylesheet rules to the form

  • add the @user variable to the new action in the UsersController

  1. Add the create action to the UsersController to handle the creation of new users by using the sign up form

  2. Add signup error messages in the _error_messages.html.erb shared partial

  3. Add the flash in the application.html.erb, i.e., a message that appears on a page and then dissappears upon visiting a second page or on page reload

##LAB10 26) Add sessions for sign in/out; realized with a controller and a cookie for the model

  • we implemented a permanent sign in: the user will be logged out only if she'll execute an explicit sign out

  • add a secure remember token on the model for each user and store it as a permanent cookie rather than one that expires on browser close

  • add bootstrap.js to the app assets

  • update the existing users to support the new functionalities

  1. Add the functionalities for editing, showing and deleting users

  2. Add some fake users to the site

  • add the gem named faker

  • add a rake task to generate fake users (sample_data.rake)

  • bundle exec rake db:populate

  1. Add pagination functionalities for showing all the users
  • add the gems named gem will_paginate and bootstrap-will_paginate
  1. Create administrative users: the ones who can delete other registered users
  • create a migration add_admin_to_users

  • update the existing users

##LAB 11

  1. Create a Micropost model and its migration
  • rails generate model Micropost content:string user_id:integer

  • add a index in order to retrieve all the microposts associated with a given user id in reverse order of creation

  • since we want that a micropost belongs to a specific existing user, we must create a new micropost using micropost.user.create instead of Micropost.create. In this way, each user has her micropost and each micropost belong to a specific user.

  • add a descendent order for the microposts

  1. Automatically destroy all the microposts of a destroyed user

  2. Show the micropost in the single user page

  3. Update the sample_data rake task to insert some fake microposts for the first six users

  4. Add some stylesheet rules for visualizing the microposts

  5. Add the possibility to create a micropost via web interface

  • add a signed_in helper (in the session helpers) to assure that no micropost will be created without a user signed in

  • update controllers and error partial to handle micropost creation

  1. Add the destroy functionality for microposts

##LAB 12

  1. Add a new model, Relationship, to handle following mechanism with:
  • two (integer) fields, follower_id e followed_id

  • three indexes, two for efficiency and one to ensure that a user can't follow another user more than once

  1. Update the User model for following mechanism (has_many and follow/unfollow methods) and the Relationship model (belongs_to and some validations)

  2. Update the populate rake task

  3. Update the interface for handling following mechanism

  • update the users route

  • add a partial for displaying follower stats

  • add a partial for the follow/unfollow button and update the routes for user relationships

  • add followers and following pages

  • add a working follow button (by using jQuery): edit the relationship controller, the follow/unfollow partials and add two js.erb files

  1. Extra: finish the implementation of the status feed

LAB 13

  1. Add a (simple) users' search form only for logged in users...

LAB 14

  1. Add a gem for private messaging: simple-private-messages

  2. Partially implemented a private messaging system: you can now send a message to another user and read the received messages

youre-do's People

Stargazers

Strange97 avatar

Watchers

 avatar Dana avatar Strange97 avatar  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.