Skip to content

Add comment-p1#6

Open
nghiadk1102 wants to merge 1 commit intomasterfrom
comment
Open

Add comment-p1#6
nghiadk1102 wants to merge 1 commit intomasterfrom
comment

Conversation

@nghiadk1102
Copy link
Owner

No description provided.

@nghiadk1102
Copy link
Owner Author

ready

@nghiadk1102 nghiadk1102 changed the title Add comment and flow user Add comment-p1 Jul 20, 2017
@nghiadk1102 nghiadk1102 force-pushed the comment branch 2 times, most recently from cf397f6 to 95186c6 Compare July 20, 2017 08:57
@nghiadk1102
Copy link
Owner Author

ready

@nghiadk1102 nghiadk1102 force-pushed the comment branch 4 times, most recently from b644a40 to e3e2eb1 Compare July 20, 2017 09:38
@@ -0,0 +1,30 @@
<% user = comment.user %>
<li>
<%= link_to gravatar_for(user, size: 30), user %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

gem config

@@ -0,0 +1,30 @@
<% user = comment.user %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

em xử lý lấy user của comment trong controller nhé

Copy link
Owner Author

Choose a reason for hiding this comment

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

do tách pull nên controller bị chuyển sang pull khác ạ, em sẽ sửa lại sau

<li>
<%= link_to gravatar_for(user, size: 30), user %>
<%= user.name %> : <%= comment.content %>

Copy link
Collaborator

Choose a reason for hiding this comment

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

xóa dòng này



<span class="timestamp">
<label class="reply">reply</label>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I18n

</ul>

<%= form_for(Comment.new, html: {class: "newcomment2rd"}) do |f| %>

Copy link
Collaborator

Choose a reason for hiding this comment

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

xóa dòng

</section>
</aside>
<div class="col-md-8">
<%= render 'follow_form' if user_signed_in? %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

nháy đôi

@@ -0,0 +1,30 @@
<% provide(:title, @title) %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove ()

<%= gravatar_for @user %>
<h1><%= @user.name %></h1>
<span><%= link_to "view my profile", @user %></span>
<span><b>posts:</b> <%= @user.posts.count %></span>
Copy link
Collaborator

Choose a reason for hiding this comment

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

  • I18n
  • em dùng css để định kiểu chữ in đậm nhé, ko dùng thẻ <b>
  • @user.posts.size

<span><b>posts:</b> <%= @user.posts.count %></span>
</section>
<section class="stats">
<%= render 'shared/stats' %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

nháy đôi

<% if @users.any? %>
<div class="user_avatars">
<% @users.each do |user| %>
<%= link_to gravatar_for(user, size: 30), user %>
Copy link
Collaborator

Choose a reason for hiding this comment

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

I18n

@nghiadk1102 nghiadk1102 force-pushed the comment branch 2 times, most recently from 7a0bfff to e6175a4 Compare July 21, 2017 09:59
@nghiadk1102
Copy link
Owner Author

ready

Copy link
Collaborator

Choose a reason for hiding this comment

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

indent from line 19-24

Copy link
Collaborator

Choose a reason for hiding this comment

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

Thừa dấu cách nè

Copy link
Collaborator

Choose a reason for hiding this comment

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

using size method

@huongnguyenmta
Copy link
Collaborator

commented

@nghiadk1102
Copy link
Owner Author

ready


def show
@posts = @user.posts.order_by_desc.page(params[:page]).per Settings.controller.pre_page
@unfollow = current_user.active_relationships.find_by(followed_id: @user.id)
Copy link
Collaborator

Choose a reason for hiding this comment

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

remove ()

@@ -0,0 +1,2 @@
$("#follow_form").html("<%= escape_javascript(render('users/follow')) %>");
$("#followers").html('<%= @user.followers.count %>');
Copy link
Collaborator

Choose a reason for hiding this comment

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

using size method

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.

3 participants