From e47e83cf6bded3d1924b4d500193e7876833ef83 Mon Sep 17 00:00:00 2001 From: Kelly Rauchenberger Date: Sun, 2 Jul 2017 13:03:43 -0400 Subject: Created admin panel Currently allows you to create and edit blogs, including associated records. Uses a WYSIWYG editor that allows uploading images. Also included jQuery :( --- .../20170629184901_create_ckeditor_assets.rb | 23 ++++++++++++++++++++++ db/schema.rb | 15 +++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20170629184901_create_ckeditor_assets.rb (limited to 'db') diff --git a/db/migrate/20170629184901_create_ckeditor_assets.rb b/db/migrate/20170629184901_create_ckeditor_assets.rb new file mode 100644 index 0000000..da986fd --- /dev/null +++ b/db/migrate/20170629184901_create_ckeditor_assets.rb @@ -0,0 +1,23 @@ +class CreateCkeditorAssets < ActiveRecord::Migration[5.1] + def self.up + create_table :ckeditor_assets do |t| + t.string :data_file_name, null: false + t.string :data_content_type + t.integer :data_file_size + t.string :data_fingerprint + t.string :type, limit: 30 + + # Uncomment it to save images dimensions, if your need it + t.integer :width + t.integer :height + + t.timestamps null: false + end + + add_index :ckeditor_assets, :type + end + + def self.down + drop_table :ckeditor_assets + end +end diff --git a/db/schema.rb b/db/schema.rb index b690393..c7c82ac 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,20 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20170625151955) do +ActiveRecord::Schema.define(version: 20170629184901) do + + create_table "ckeditor_assets", force: :cascade do |t| + t.string "data_file_name", null: false + t.string "data_content_type" + t.integer "data_file_size" + t.string "data_fingerprint" + t.string "type", limit: 30 + t.integer "width" + t.integer "height" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + t.index ["type"], name: "index_ckeditor_assets_on_type" + end create_table "entries", force: :cascade do |t| t.string "title" -- cgit 1.4.1