Commit 3097e5b5 by Đường Sỹ Hoàng

Removed unuse file

parent 123f77ee
......@@ -9,13 +9,17 @@ class UsersController < ApplicationController
def show
@user = User.find(params[:id])
<<<<<<< HEAD
redirect_to root_url and return unless @user.activated
=======
redirect_to root_url and return unless @user.activated
>>>>>>> Removed unuse file
@microposts = @user.microposts.paginate(page: params[:page])
end
def new
@user = User.new
end
end
def create
@user = User.new(user_params)
......
......@@ -4,8 +4,7 @@ class Micropost < ApplicationRecord
mount_uploader :picture, PictureUploader
belongs_to :user
validates :user_id, presence: true
validates :content, presence: true, length: { maximum: 140 }
validate :picture_size
......
......@@ -24,7 +24,7 @@ class User < ApplicationRecord
has_secure_password
class << self
# Returns the hash digest of the given string.
# Returns the hash digest of the given string.
def digest(string)
cost = ActiveModel::SecurePassword.min_cost ? BCrypt::Engine::MIN_COST : BCrypt::Engine.cost
BCrypt::Password.create(string, cost: cost)
......
......@@ -5,10 +5,17 @@
<div class="row">
<div class="col-md-6 col-md-offset-3">
<<<<<<< HEAD
<%= render "form" %>
<div class="gravatar_edit">
<%= gravatar_for @user %>
<a href="http://gravatar.com/emails">change</a>
=======
<%= render "form" %>
<div class="gravatar_edit">
<%= gravatar_for @user %>
<a href="http://gravatar.com/emails">change</a>
>>>>>>> Removed unuse file
</div>
</div>
</div>
......
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