diff options
author | Seb Bacon <seb.bacon@gmail.com> | 2012-05-15 11:04:50 +0100 |
---|---|---|
committer | Seb Bacon <seb.bacon@gmail.com> | 2012-05-23 09:15:49 +0100 |
commit | ce72f203bbeb6ee5ae356f12b007b9631cf0dd7a (patch) | |
tree | 911efe64de32e4103cd4999d2f0c53cd0a8b6840 /app/models/censor_rule.rb | |
parent | 20b2a3c493d19b1ea66ba2605053af05f0595f7f (diff) |
Merge from wombleton:feature/440_sparkly_admin_css
Includes a couple of additional fixes:
* Remember to HTML-quote things that could come from users
* Fix form post action for editing users
Diffstat (limited to 'app/models/censor_rule.rb')
-rw-r--r-- | app/models/censor_rule.rb | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/app/models/censor_rule.rb b/app/models/censor_rule.rb index 201e60746..72b92d462 100644 --- a/app/models/censor_rule.rb +++ b/app/models/censor_rule.rb @@ -51,7 +51,10 @@ class CensorRule < ActiveRecord::Base errors.add("Censor must apply to an info request a user or a body; ") end end -end - - + def for_admin_column + self.class.content_columns.each do |column| + yield(column.human_name, self.send(column.name), column.type.to_s, column.name) + end + end +end |