diff options
author | James McKinney <james@slashpoundbang.com> | 2015-05-20 16:14:50 +0200 |
---|---|---|
committer | James McKinney <james@slashpoundbang.com> | 2015-05-20 16:14:50 +0200 |
commit | c2363fa235376ee2c5b04f4ee6fa7ea60172b9e7 (patch) | |
tree | 4067d6af62ba74dc4a0123f82980bbecaba1325d /app/models/comment.rb | |
parent | da706b6c05ee7d0be15b59cf0fdec7f6d3ed58ec (diff) |
Add a AdminColumn concern
Diffstat (limited to 'app/models/comment.rb')
-rw-r--r-- | app/models/comment.rb | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/app/models/comment.rb b/app/models/comment.rb index ab4acfe56..17731dac6 100644 --- a/app/models/comment.rb +++ b/app/models/comment.rb @@ -21,6 +21,7 @@ # Email: hello@mysociety.org; WWW: http://www.mysociety.org/ class Comment < ActiveRecord::Base + include AdminColumn strip_attributes! belongs_to :user @@ -76,12 +77,6 @@ class Comment < ActiveRecord::Base text.html_safe end - def for_admin_column - self.class.content_columns.each do |column| - yield(column.human_name, send(column.name), column.type.to_s, column.name) - end - end - private def check_body_has_content |