Commit 1cf7b5ac by Đường Sỹ Hoàng

Fixed coding styles

parent 183850cf
......@@ -54,14 +54,14 @@ class UsersController < ApplicationController
def following
@title = "Following"
@user = User.find(params[:id])
@user = User.find(params[:id])
@users = @user.following.paginate(page: params[:page])
render "show_follow"
end
def followers
@title = "Followers"
@user = User.find(params[:id])
@user = User.find(params[:id])
@users = @user.followers.paginate(page: params[:page])
render "show_follow"
end
......
module RelationshipsHelper
end
......@@ -90,7 +90,7 @@ class User < ApplicationRecord
# See "Following users" for the full implementation.
def feed
following_ids = "SELECT followed_id FROM relationships
WHERE follower_id = :user_id"
WHERE follower_id = :user_id"
Micropost.where("user_id IN (#{following_ids})
OR user_id = :user_id", user_id: id)
end
......@@ -119,7 +119,7 @@ class User < ApplicationRecord
# Creates and assigns the activation token and digest.
def create_activation_digest
self.activation_token = User.new_token
self.activation_token = User.new_token
self.activation_digest = User.digest(activation_token)
end
end
......@@ -6,12 +6,16 @@
<div class="row">
<div class="col-md-6 col-md-offset-3">
<<<<<<< HEAD
<<<<<<< HEAD
<%= render "form" %>
<div class="gravatar_edit">
<%= gravatar_for @user %>
<a href="http://gravatar.com/emails">change</a>
=======
<%= render "form" %>
=======
<%= render "form" %>
>>>>>>> Fixed coding styles
<div class="gravatar_edit">
<%= gravatar_for @user %>
<a href="http://gravatar.com/emails">change</a>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment