Wrap lines at 80 chars
This commit is contained in:
parent
0e671acc18
commit
9122527192
|
@ -35,12 +35,15 @@ class Person < ActiveRecord::Base
|
||||||
has_many :articles
|
has_many :articles
|
||||||
if ActiveRecord::VERSION::MAJOR == 3
|
if ActiveRecord::VERSION::MAJOR == 3
|
||||||
if RUBY_VERSION >= '2.3'
|
if RUBY_VERSION >= '2.3'
|
||||||
has_many :published_articles, class_name: "Article", conditions: "published = 't'"
|
has_many :published_articles, class_name: "Article",
|
||||||
|
conditions: "published = 't'"
|
||||||
else
|
else
|
||||||
has_many :published_articles, class_name: "Article", conditions: { published: true }
|
has_many :published_articles, class_name: "Article",
|
||||||
|
conditions: { published: true }
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
has_many :published_articles, ->{ where(published: true) }, class_name: "Article"
|
has_many :published_articles, ->{ where(published: true) },
|
||||||
|
class_name: "Article"
|
||||||
end
|
end
|
||||||
has_many :comments
|
has_many :comments
|
||||||
has_many :authored_article_comments, through: :articles,
|
has_many :authored_article_comments, through: :articles,
|
||||||
|
|
Loading…
Reference in New Issue