Adding Followers to Users – DIY Twitter Clone #9

[ad_1]
In this lesson we will be implementing follower and following relationships into our Twitter clone. We will create both active and passive relationships – which represent (following) and (being followed), and we will build a form which allows the user to follow another user thanks to some logic in a new controller.

This implementation is based off of Michael Hartl’s implementation of followers in his “Ruby on Rails” tutorial book:

Download this project’s files at:

——– SUGGESTED READING ——–

“Clean Code” by Robert C. Martin:
“Game Coding Complete” by Mike McShaffry:
“JavaScript and JQuery” by Jon Ducket:

——– ADDITIONAL INFORMATION ——–

Creating, updating and managing DevFactor’s large collection of tutorials requires many hours of work on a weekly basis. If you have found our tutorials useful, please support us by subscribing and sharing our videos on social media.

If you have any feedback in regards to how we could improve the channel’s content, editing, or organization feel free to get in touch and make a suggestion!

Subscribe on YouTube:

——– GENERAL INFORMATION ——–

DevFactor offers high-quality, project based tutorials on web development, game development and software engineering. Simply by subscribing you can gain access to our large library of free programming video tutorials.

DevFactor was started in order to aid anyone regardless of age, race, gender or location to learn how to build, maintain and deploy their own software applications.

#programming #code #devfactor


Posted

in

by

Tags:

Comments

10 responses to “Adding Followers to Users – DIY Twitter Clone #9”

  1. J Coder Avatar

    Seriously. Dude it's an amazing tutorial so far till Part 20. Part 21 just didn't work at all. I'm getting a really awful error. Somebody please help me out::::::::::::::::::

    1. <%= User.find_by_username(params[:id]).followers.count %>: added to application.html.erb
    2. <%= render '/components/follow_button', :user => User.find_by_username(params[:id]) %>: added to profile.html.erb

    Error:

    SQLite3::SQLException: no such column: relationships.followed_id: SELECT COUNT(*) FROM "users" INNER JOIN "relationships" ON "users"."id" = "relationships"."follower_id" WHERE "relationships"."followed_id" = ?

    Please help me out. Would appreciate it as follow and unfollow option is not working!

  2. Ronald Davis Avatar

    could not get this to work

  3. Deborah Crane Avatar

    Whee, I'm Really happy that i finally got Twitter Followers, such a big amount also 🙂 try this APPTWITTERFOLLOWERS .COM

  4. Tasha Weber Avatar

    Just search on google ( TWITTFOLLOWERSNET ) I started out with 1000 followers and now 1,666 followers.

  5. Casey Gregory Avatar

    Whee, I'm Really happy that i finally got Twitter Followers, such a big amount also 🙂 try this TWITTFOLLOWERSNET

  6. Carolyn Spencer Avatar

    Legit, I get over 300+ likes per post on IG. All from the 3000+ followers i got from using ( TWITTFOLLOWERSNET )

  7. Zelda Holt Avatar

    If your profile is on public view, you can sign up to get 1000 Twitter followers in under 60 minutes for free at ( TWITTFOLLOWERSNET )

  8. LemonTop Avatar

    If anyone gets "undefined method 'relationship_path'" you need to add "resources: relationships" in routes.rb

  9. Edward Yao Avatar

    First argument in form cannot contain nil or be empty

Leave a Reply

Your email address will not be published. Required fields are marked *