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:
@@ -10,8 +10,6 @@ class CreateCkeditorAssets < ActiveRecord::Migration
|
||||
t.integer :width
|
||||
t.integer :height
|
||||
|
||||
t.integer :user_id
|
||||
|
||||
t.timestamps null: false
|
||||
end
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user