aboutsummaryrefslogtreecommitdiffstats
path: root/app/models
diff options
context:
space:
mode:
Diffstat (limited to 'app/models')
-rw-r--r--app/models/incoming_message.rb16
-rw-r--r--app/models/info_request.rb14
-rw-r--r--app/models/info_request_event.rb12
-rw-r--r--app/models/outgoing_message.rb16
-rw-r--r--app/models/post_redirect.rb22
-rw-r--r--app/models/public_body.rb20
-rw-r--r--app/models/user.rb18
7 files changed, 61 insertions, 57 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb
index 23e513508..2d35e14f2 100644
--- a/app/models/incoming_message.rb
+++ b/app/models/incoming_message.rb
@@ -1,16 +1,16 @@
# == Schema Information
-# Schema version: 25
+# Schema version: 26
#
# Table name: incoming_messages
#
# id :integer not null, primary key
-# info_request_id :integer
-# raw_data :text
-# created_at :datetime
-# updated_at :datetime
-# user_classified :boolean default(false)
+# info_request_id :integer not null
+# raw_data :text not null
+# created_at :datetime not null
+# updated_at :datetime not null
+# user_classified :boolean default(false), not null
# contains_information :boolean
-# is_bounce :boolean default(false)
+# is_bounce :boolean default(false), not null
#
# models/incoming_message.rb:
@@ -20,7 +20,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: incoming_message.rb,v 1.35 2008-01-23 01:59:23 francis Exp $
+# $Id: incoming_message.rb,v 1.36 2008-01-24 15:53:15 francis Exp $
# TODO
diff --git a/app/models/info_request.rb b/app/models/info_request.rb
index 6f7c5d6d3..445682e1a 100644
--- a/app/models/info_request.rb
+++ b/app/models/info_request.rb
@@ -1,14 +1,14 @@
# == Schema Information
-# Schema version: 25
+# Schema version: 26
#
# Table name: info_requests
#
# id :integer not null, primary key
-# title :text
-# user_id :integer
-# public_body_id :integer
-# created_at :datetime
-# updated_at :datetime
+# title :text not null
+# user_id :integer not null
+# public_body_id :integer not null
+# created_at :datetime not null
+# updated_at :datetime not null
#
# models/info_request.rb:
@@ -17,7 +17,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: info_request.rb,v 1.28 2008-01-21 10:20:34 francis Exp $
+# $Id: info_request.rb,v 1.29 2008-01-24 15:53:15 francis Exp $
require 'digest/sha1'
diff --git a/app/models/info_request_event.rb b/app/models/info_request_event.rb
index 9e4d8f6b9..320ebd7e8 100644
--- a/app/models/info_request_event.rb
+++ b/app/models/info_request_event.rb
@@ -1,13 +1,13 @@
# == Schema Information
-# Schema version: 25
+# Schema version: 26
#
# Table name: info_request_events
#
# id :integer not null, primary key
-# info_request_id :integer
-# event_type :text
-# params_yaml :text
-# created_at :datetime
+# info_request_id :integer not null
+# event_type :text not null
+# params_yaml :text not null
+# created_at :datetime not null
#
# models/info_request_event.rb:
@@ -15,7 +15,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: info_request_event.rb,v 1.6 2008-01-21 11:08:16 francis Exp $
+# $Id: info_request_event.rb,v 1.7 2008-01-24 15:53:15 francis Exp $
class InfoRequestEvent < ActiveRecord::Base
belongs_to :info_request
diff --git a/app/models/outgoing_message.rb b/app/models/outgoing_message.rb
index 9eacab767..5010a6c2b 100644
--- a/app/models/outgoing_message.rb
+++ b/app/models/outgoing_message.rb
@@ -1,15 +1,15 @@
# == Schema Information
-# Schema version: 25
+# Schema version: 26
#
# Table name: outgoing_messages
#
# id :integer not null, primary key
-# info_request_id :integer
-# body :text
-# status :string(255)
-# message_type :string(255)
-# created_at :datetime
-# updated_at :datetime
+# info_request_id :integer not null
+# body :text not null
+# status :string(255) not null
+# message_type :string(255) not null
+# created_at :datetime not null
+# updated_at :datetime not null
# last_sent_at :datetime
# incoming_message_followup_id :integer
#
@@ -21,7 +21,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: outgoing_message.rb,v 1.22 2008-01-21 10:20:34 francis Exp $
+# $Id: outgoing_message.rb,v 1.23 2008-01-24 15:53:15 francis Exp $
class OutgoingMessage < ActiveRecord::Base
belongs_to :info_request
diff --git a/app/models/post_redirect.rb b/app/models/post_redirect.rb
index 9a8b06439..b468735de 100644
--- a/app/models/post_redirect.rb
+++ b/app/models/post_redirect.rb
@@ -1,27 +1,31 @@
# == Schema Information
-# Schema version: 25
+# Schema version: 26
#
# Table name: post_redirects
#
# id :integer not null, primary key
-# token :text
-# uri :text
+# token :text not null
+# uri :text not null
# post_params_yaml :text
-# created_at :datetime
-# updated_at :datetime
-# email_token :text
+# created_at :datetime not null
+# updated_at :datetime not null
+# email_token :text not null
# reason_params_yaml :text
# user_id :integer
#
# models/post_redirect.rb:
-# Saves an HTTP POST request, so it can be redirected to later.
-# For example, after registering / logging in.
+# Saves an HTTP request, so it can be redirected to later. For example, after
+# registering / logging in. This can save POST requests, if post_params_yaml
+# is not null.
+#
+# See check_in_post_redirect in controllers/application.rb for the hack that
+# fakes the redirect to include POST parameters in request later.
#
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: post_redirect.rb,v 1.12 2008-01-14 19:11:18 francis Exp $
+# $Id: post_redirect.rb,v 1.13 2008-01-24 15:53:15 francis Exp $
require 'openssl' # for random bytes function
diff --git a/app/models/public_body.rb b/app/models/public_body.rb
index 99b829b0f..cc3d1d928 100644
--- a/app/models/public_body.rb
+++ b/app/models/public_body.rb
@@ -1,18 +1,18 @@
# == Schema Information
-# Schema version: 25
+# Schema version: 26
#
# Table name: public_bodies
#
# id :integer not null, primary key
-# name :text
-# short_name :text
-# request_email :text
+# name :text not null
+# short_name :text not null
+# request_email :text not null
# complaint_email :text
-# version :integer
-# last_edit_editor :string(255)
-# last_edit_comment :string(255)
-# created_at :datetime
-# updated_at :datetime
+# 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
#
# models/public_body.rb:
@@ -21,7 +21,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: public_body.rb,v 1.13 2008-01-10 01:13:28 francis Exp $
+# $Id: public_body.rb,v 1.14 2008-01-24 15:53:15 francis Exp $
class PublicBody < ActiveRecord::Base
validates_presence_of :name
diff --git a/app/models/user.rb b/app/models/user.rb
index cc2ca88ab..31d6b43a3 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -1,16 +1,16 @@
# == Schema Information
-# Schema version: 25
+# Schema version: 26
#
# Table name: users
#
# id :integer not null, primary key
-# email :string(255) default("ook")
-# name :string(255)
-# hashed_password :string(255)
-# salt :string(255)
-# created_at :datetime
-# updated_at :datetime
-# email_confirmed :boolean default(false)
+# email :string(255) not null
+# name :string(255) not null
+# hashed_password :string(255) not null
+# salt :string(255) not null
+# created_at :datetime not null
+# updated_at :datetime not null
+# email_confirmed :boolean default(false), not null
#
# models/user.rb:
@@ -19,7 +19,7 @@
# Copyright (c) 2007 UK Citizens Online Democracy. All rights reserved.
# Email: francis@mysociety.org; WWW: http://www.mysociety.org/
#
-# $Id: user.rb,v 1.21 2008-01-23 01:59:23 francis Exp $
+# $Id: user.rb,v 1.22 2008-01-24 15:53:15 francis Exp $
require 'digest/sha1'