Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] コメントをつけられるようにする [closes #35] #64

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

yucao24hours
Copy link
Member

@yucao24hours yucao24hours commented Aug 26, 2016

#77 が master マージされてからこのブランチをマージする必要があります。 done

やってること

投稿に対してコメントをつけられるようにします。

TODO

  • コントローラ
  • コメントを出すフォー無をつくる 😵
  • post#index にコメントの数とかが出てると嬉しいかも(別 PR でもよい)

対応 issue

connects to #35

@yucao24hours yucao24hours force-pushed the comment branch 2 times, most recently from 0b5e9be to 05a9b7a Compare August 29, 2016 08:38
@@ -2,6 +2,7 @@ class User < ActiveRecord::Base
include Authenticator

has_many :posts, foreign_key: 'created_by_id'
has_many :comments, foreign_key: 'commented_by_id'

Choose a reason for hiding this comment

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

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

click_button 'create comment'

within '.comment__body' do
expect(page).must_have_content 'Lorem ipsum dolor sit amet'

Choose a reason for hiding this comment

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

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.

@yucao24hours yucao24hours force-pushed the comment branch 2 times, most recently from e72987d to efd2762 Compare September 12, 2016 01:31
resources :posts
resources :users, only: %i( index show )
resources :posts do
resources :comments, only: %i( index new create )

Choose a reason for hiding this comment

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

Do not use spaces inside percent literal delimiters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants