ref: master
plugins/community_track/lib/ext/article.rb
1 2 3 4 5 6 7 8 9 10 11 12
require_dependency 'article' class Article before_create do |article| if article.parent.kind_of?(CommunityTrackPlugin::Step) article.accept_comments = article.parent.accept_comments end true end end