added deleted column to reports

This commit is contained in:
nilsding 2014-12-28 21:34:36 +01:00
parent b6c0b1864a
commit 7d55141a1a
3 changed files with 11 additions and 5 deletions

View File

@ -2,5 +2,5 @@
.row
= render 'moderation/moderation_tabs'
.col-md-9.col-sm-9.col-xs-12
- Report.all.reverse_order.each do |r|
- Report.where(deleted: false).reverse_order.each do |r|
= render 'moderation/moderationbox', report: r

View File

@ -0,0 +1,5 @@
class AddDeletedToReports < ActiveRecord::Migration
def change
add_column :reports, :deleted, :boolean, default: false
end
end

View File

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20141227130618) do
ActiveRecord::Schema.define(version: 20141228202825) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@ -102,11 +102,12 @@ ActiveRecord::Schema.define(version: 20141227130618) do
add_index "relationships", ["target_id"], name: "index_relationships_on_target_id", using: :btree
create_table "reports", force: true do |t|
t.string "type", null: false
t.integer "target_id", null: false
t.integer "user_id", null: false
t.string "type", null: false
t.integer "target_id", null: false
t.integer "user_id", null: false
t.datetime "created_at"
t.datetime "updated_at"
t.boolean "deleted", default: false
end
create_table "services", force: true do |t|