diff options
-rw-r--r-- | app/models/incoming_message.rb | 4 | ||||
-rw-r--r-- | app/models/user.rb | 4 | ||||
-rw-r--r-- | config/environment.rb | 4 | ||||
-rw-r--r-- | config/environments/development.rb | 3 | ||||
-rw-r--r-- | db/schema.rb | 133 |
5 files changed, 77 insertions, 71 deletions
diff --git a/app/models/incoming_message.rb b/app/models/incoming_message.rb index a424a27b3..23e513508 100644 --- a/app/models/incoming_message.rb +++ b/app/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.34 2008-01-22 19:45:07 francis Exp $ +# $Id: incoming_message.rb,v 1.35 2008-01-23 01:59:23 francis Exp $ # TODO @@ -31,6 +31,8 @@ module TMail class Mail attr_accessor :url_part_number + # Monkeypatch! (check to see if this becomes a standard function in + # TMail::Mail, then use that, whatever it is called) def self.get_part_file_name(part) file_name = (part['content-location'] && part['content-location'].body) || diff --git a/app/models/user.rb b/app/models/user.rb index aa036e068..cc2ca88ab 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -4,7 +4,7 @@ # Table name: users # # id :integer not null, primary key -# email :string(255) +# email :string(255) default("ook") # name :string(255) # hashed_password :string(255) # salt :string(255) @@ -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.20 2008-01-22 19:45:07 francis Exp $ +# $Id: user.rb,v 1.21 2008-01-23 01:59:23 francis Exp $ require 'digest/sha1' diff --git a/config/environment.rb b/config/environment.rb index 62db9d0ae..5408056ad 100644 --- a/config/environment.rb +++ b/config/environment.rb @@ -79,8 +79,8 @@ ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| %(<span clas # Monkeypatch! Output HTML 4.0 compliant code, using method described in this # ticket: http://dev.rubyonrails.org/ticket/6009 ActionView::Helpers::TagHelper.module_eval do - def tag(name, options = nil, open = false) - "<#{name}#{tag_options(options.stringify_keys) if options}>" + def tag(name, options = nil, open = false, escape = true) + "<#{name}#{tag_options(options, escape) if options}" + (open ? ">" : ">") end end diff --git a/config/environments/development.rb b/config/environments/development.rb index 243eb489c..eb5fe21c4 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -8,9 +8,6 @@ config.cache_classes = false # Log error messages when you accidentally call methods on nil. config.whiny_nils = true -# Enable the breakpoint server that script/breakpointer connects to -config.breakpoint_server = true - # Show full error reports and disable caching config.action_controller.consider_all_requests_local = true config.action_controller.perform_caching = false diff --git a/db/schema.rb b/db/schema.rb index 3632942d1..dccf6924c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -1,98 +1,105 @@ -# This file is autogenerated. Instead of editing this file, please use the -# migrations feature of ActiveRecord to incrementally modify your database, and +# This file is auto-generated from the current state of the database. Instead of editing this file, +# please use the migrations feature of ActiveRecord to incrementally modify your database, and # then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your database schema. If you need +# to create the application database on another system, you should be using db:schema:load, not running +# all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended to check this file into your version control system. ActiveRecord::Schema.define(:version => 25) do create_table "incoming_messages", :force => true do |t| - t.column "info_request_id", :integer - t.column "raw_data", :text - t.column "created_at", :datetime - t.column "updated_at", :datetime - t.column "user_classified", :boolean, :default => false - t.column "contains_information", :boolean - t.column "is_bounce", :boolean, :default => false + t.integer "info_request_id" + t.text "raw_data" + t.datetime "created_at" + t.datetime "updated_at" + t.boolean "user_classified", :default => false + t.boolean "contains_information" + t.boolean "is_bounce", :default => false end create_table "info_request_events", :force => true do |t| - t.column "info_request_id", :integer - t.column "event_type", :text - t.column "params_yaml", :text - t.column "created_at", :datetime + t.integer "info_request_id" + t.text "event_type" + t.text "params_yaml" + t.datetime "created_at" end create_table "info_requests", :force => true do |t| - t.column "title", :text - t.column "user_id", :integer - t.column "public_body_id", :integer - t.column "created_at", :datetime - t.column "updated_at", :datetime + t.text "title" + t.integer "user_id" + t.integer "public_body_id" + t.datetime "created_at" + t.datetime "updated_at" end create_table "outgoing_messages", :force => true do |t| - t.column "info_request_id", :integer - t.column "body", :text - t.column "status", :string - t.column "message_type", :string - t.column "created_at", :datetime - t.column "updated_at", :datetime - t.column "last_sent_at", :datetime - t.column "incoming_message_followup_id", :integer + t.integer "info_request_id" + t.text "body" + t.string "status" + t.string "message_type" + t.datetime "created_at" + t.datetime "updated_at" + t.datetime "last_sent_at" + t.integer "incoming_message_followup_id" end create_table "post_redirects", :force => true do |t| - t.column "token", :text - t.column "uri", :text - t.column "post_params_yaml", :text - t.column "created_at", :datetime - t.column "updated_at", :datetime - t.column "email_token", :text - t.column "reason_params_yaml", :text - t.column "user_id", :integer + t.text "token" + t.text "uri" + t.text "post_params_yaml" + t.datetime "created_at" + t.datetime "updated_at" + t.text "email_token" + t.text "reason_params_yaml" + t.integer "user_id" end create_table "public_bodies", :force => true do |t| - t.column "name", :text - t.column "short_name", :text - t.column "request_email", :text - t.column "complaint_email", :text - t.column "version", :integer - t.column "last_edit_editor", :string - t.column "last_edit_comment", :string - t.column "created_at", :datetime - t.column "updated_at", :datetime + t.text "name" + t.text "short_name" + t.text "request_email" + t.text "complaint_email" + t.integer "version" + t.string "last_edit_editor" + t.string "last_edit_comment" + t.datetime "created_at" + t.datetime "updated_at" end create_table "public_body_versions", :force => true do |t| - t.column "public_body_id", :integer - t.column "version", :integer - t.column "name", :text - t.column "short_name", :text - t.column "request_email", :text - t.column "complaint_email", :text - t.column "updated_at", :datetime - t.column "last_edit_editor", :string - t.column "last_edit_comment", :string + t.integer "public_body_id" + t.integer "version" + t.text "name" + t.text "short_name" + t.text "request_email" + t.text "complaint_email" + t.datetime "updated_at" + t.string "last_edit_editor" + t.string "last_edit_comment" end create_table "sessions", :force => true do |t| - t.column "session_id", :string - t.column "data", :text - t.column "updated_at", :datetime - t.column "created_at", :datetime + t.string "session_id" + t.text "data" + t.datetime "updated_at" + t.datetime "created_at" end add_index "sessions", ["session_id"], :name => "index_sessions_on_session_id" add_index "sessions", ["updated_at"], :name => "index_sessions_on_updated_at" create_table "users", :force => true do |t| - t.column "email", :string - t.column "name", :string - t.column "hashed_password", :string - t.column "salt", :string - t.column "created_at", :datetime - t.column "updated_at", :datetime - t.column "email_confirmed", :boolean, :default => false + t.string "email", :default => "ook" + t.string "name" + t.string "hashed_password" + t.string "salt" + t.datetime "created_at" + t.datetime "updated_at" + t.boolean "email_confirmed", :default => false end end |