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

Add article validation #7

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

Add article validation #7

wants to merge 2 commits into from

Conversation

alitaso345
Copy link
Contributor

ref #4
@asonas @kirikiriyamama articleのtitleとbodyにバリデーションかけました
titleのほうは長すぎるとよくないと思ったので制限を20文字にしました〜

@igaiga
Copy link
Member

igaiga commented Oct 25, 2014

LGTM〜

@@ -1,2 +1,4 @@
class Article < ActiveRecord::Base
validates :title, presence: true, length: {maximum: 20}
Copy link
Member

Choose a reason for hiding this comment

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

ハッシュの波括弧、こんなかんじ { maximum: 20 } でスペースをあけたいですー

See also: https://github.com/cookpad/styleguide/blob/master/ruby.ja.md#%E3%83%8F%E3%83%83%E3%82%B7%E3%83%A5

@kirikiriyamama
Copy link
Member

🙆‍♀️

@alitaso345
Copy link
Contributor Author

@kirikiriyamama よいかんじスペースにしました!!!

@kirikiriyamama
Copy link
Member

GOGO!!

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