Skip to content

Commit

Permalink
Require tags on questions only
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed May 19, 2020
1 parent f2ad30b commit 7e4c31b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/post.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ class Post < ApplicationRecord
validate :stripped_minimum, if: :question?
validate :category_allows_post_type
validate :license_available
validate :required_tags?
validate :required_tags?, if: -> { post_type_id == Question.post_type_id }

scope :undeleted, -> { where(deleted: false) }
scope :deleted, -> { where(deleted: true) }
Expand Down

0 comments on commit 7e4c31b

Please sign in to comment.