Skip to content

Commit

Permalink
Remove stamper from content model (AlchemyCMS#1808)
Browse files Browse the repository at this point in the history
The content model always ever is created within an element and
it does not make sense to have this information twice.
  • Loading branch information
tvdeyen authored May 5, 2020
1 parent 09abf7b commit c206a2a
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
2 changes: 0 additions & 2 deletions app/models/alchemy/content.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,6 @@ class Content < BaseRecord
belongs_to :element, touch: true, inverse_of: :contents
has_one :page, through: :element

stampable stamper_class_name: Alchemy.user_class_name

# Essence scopes
scope :essence_booleans, -> { where(essence_type: "Alchemy::EssenceBoolean") }
scope :essence_dates, -> { where(essence_type: "Alchemy::EssenceDate") }
Expand Down
2 changes: 0 additions & 2 deletions db/migrate/20200226213334_alchemy_four_point_four.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,6 @@ def up
t.references "element", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.references "creator"
t.references "updater"
end
end

Expand Down
4 changes: 0 additions & 4 deletions spec/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,8 @@
t.integer "element_id", null: false
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.integer "creator_id"
t.integer "updater_id"
t.index ["creator_id"], name: "index_alchemy_contents_on_creator_id"
t.index ["element_id"], name: "index_alchemy_contents_on_element_id"
t.index ["essence_type", "essence_id"], name: "index_alchemy_contents_on_essence_type_and_essence_id", unique: true
t.index ["updater_id"], name: "index_alchemy_contents_on_updater_id"
end

create_table "alchemy_elements", force: :cascade do |t|
Expand Down

0 comments on commit c206a2a

Please sign in to comment.