aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/outgoing_message.rb2
-rw-r--r--app/models/public_body.rb39
-rw-r--r--app/models/user.rb2
3 files changed, 24 insertions, 19 deletions
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb
index e2ee696c5..6efc1d2ba 100644
--- a/app/models/outgoing_message.rb
+++ b/app/models/outgoing_message.rb
@@ -12,6 +12,8 @@
# last_sent_at :datetime
# incoming_message_followup_id :integer
# what_doing :string(255) not null
+# prominence :string(255) default("normal"), not null
+# prominence_reason :text
#
# models/outgoing_message.rb:
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index 485a794b0..9e77eb181 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -3,23 +3,26 @@
#
# Table name: public_bodies
#
-# id :integer not null, primary key
-# name :text not null
-# short_name :text not null
-# request_email :text not null
-# version :integer not null
-# last_edit_editor :string(255) not null
-# last_edit_comment :text not null
-# created_at :datetime not null
-# updated_at :datetime not null
-# url_name :text not null
-# home_page :text default(""), not null
-# notes :text default(""), not null
-# first_letter :string(255) not null
-# publication_scheme :text default(""), not null
-# api_key :string(255) not null
-# info_requests_count :integer default(0), not null
-# disclosure_log :text default(""), not null
+# id :integer not null, primary key
+# name :text not null
+# short_name :text not null
+# request_email :text not null
+# version :integer not null
+# last_edit_editor :string(255) not null
+# last_edit_comment :text not null
+# created_at :datetime not null
+# updated_at :datetime not null
+# url_name :text not null
+# home_page :text default(""), not null
+# notes :text default(""), not null
+# first_letter :string(255) not null
+# publication_scheme :text default(""), not null
+# api_key :string(255) not null
+# info_requests_count :integer default(0), not null
+# disclosure_log :text default(""), not null
+# info_requests_successful_count :integer
+# info_requests_not_held_count :integer
+# info_requests_overdue_count :integer
#
require 'csv'
@@ -407,6 +410,8 @@ class PublicBody < ActiveRecord::Base
fields = {}
field_names.each{|name, i| fields[name] = row[i]}
+ yield line, fields if block_given?
+
name = row[field_names['name']]
email = row[field_names['request_email']]
next if name.nil?
diff --git a/app/models/user.rb b/app/models/user.rb
index d7c1c854e..2c4f87944 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -20,8 +20,6 @@
# email_bounce_message :text default(""), not null
# no_limit :boolean default(FALSE), not null
# receive_email_alerts :boolean default(TRUE), not null
-# address :string(255)
-# dob :date
#
require 'digest/sha1'