Removed author_exists scope. It is part of default

This commit is contained in:
Brenda Wallace
2017-06-02 22:43:14 +12:00
parent 20b980a162
commit bbc3ca749f

View File

@@ -36,8 +36,7 @@ class Post < ActiveRecord::Base
end
end
default_scope { author_exists.order(created_at: :desc) }
scope :author_exists, -> { joins(:author) }
default_scope { joins(:author).order(created_at: :desc) }
validates :subject,
presence: true,