Simplify CKEditor authorization

We can use the `config.authorize_with` option, so we don't need to copy
the controller in order to load and authorize resource.

Besides, only administrators can upload images, so we don't need to
track the image's user id.
This commit is contained in:
Javi Martín
2018-09-07 14:03:01 +02:00
parent 7347874f4b
commit 43e83889ff
5 changed files with 2 additions and 51 deletions

View File

@@ -10,8 +10,6 @@ class CreateCkeditorAssets < ActiveRecord::Migration
t.integer :width
t.integer :height
t.integer :user_id
t.timestamps null: false
end

View File

@@ -302,7 +302,6 @@ ActiveRecord::Schema.define(version: 20180813141443) do
t.string "type", limit: 30
t.integer "width"
t.integer "height"
t.integer "user_id"
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
end