Skip to content

Conversation

@bnduongnv
Copy link
Owner

No description provided.

@bnduongnv bnduongnv force-pushed the chapter_10 branch 2 times, most recently from 40ffc60 to bc01499 Compare July 20, 2018 03:19
before_action :correct_user, only: [:edit, :update]
before_action :admin_user, only: :destroy
def index
@users = User.paginate page: params[:page], per_page: 10

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cho 10 vào settings nhé

end

def edit
@user = User.find_by id: params[:id]

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lawpj code rồi nhé

cookies.permanent[:remember_token] = user.remember_token
end

def current_user? user

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

vieets trong model nhé

@@ -0,0 +1,19 @@
<%= form_for @user do |f| %>
<%= render "shared/error_messages", object: @user %>

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

indent

@bnduongnv bnduongnv force-pushed the chapter_10 branch 4 times, most recently from 1287be2 to 5a21f67 Compare July 22, 2018 10:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants