Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove stamper from essences #1802

Merged
merged 1 commit into from
May 4, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions app/models/alchemy/essence_boolean.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
# value :boolean
# created_at :datetime not null
# updated_at :datetime not null
# creator_id :integer
# updater_id :integer
#

# Stores boolean values.
Expand Down
2 changes: 0 additions & 2 deletions app/models/alchemy/essence_date.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#
# id :integer not null, primary key
# date :datetime
# creator_id :integer
# updater_id :integer
# created_at :datetime not null
# updated_at :datetime not null
#
Expand Down
2 changes: 0 additions & 2 deletions app/models/alchemy/essence_file.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
# attachment_id :integer
# title :string
# css_class :string
# creator_id :integer
# updater_id :integer
# created_at :datetime not null
# updated_at :datetime not null
# link_text :string
Expand Down
2 changes: 0 additions & 2 deletions app/models/alchemy/essence_html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@
#
# id :integer not null, primary key
# source :text
# creator_id :integer
# updater_id :integer
# created_at :datetime not null
# updated_at :datetime not null
#
Expand Down
2 changes: 0 additions & 2 deletions app/models/alchemy/essence_link.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# link_class_name :string
# created_at :datetime not null
# updated_at :datetime not null
# creator_id :integer
# updater_id :integer
#

module Alchemy
Expand Down
2 changes: 0 additions & 2 deletions app/models/alchemy/essence_picture.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@
# link_title :string
# css_class :string
# link_target :string
# creator_id :integer
# updater_id :integer
# created_at :datetime not null
# updated_at :datetime not null
# crop_from :string
Expand Down
2 changes: 0 additions & 2 deletions app/models/alchemy/essence_richtext.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
# body :text
# stripped_body :text
# public :boolean
# creator_id :integer
# updater_id :integer
# created_at :datetime not null
# updated_at :datetime not null
#
Expand Down
2 changes: 0 additions & 2 deletions app/models/alchemy/essence_select.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@
# value :string
# created_at :datetime not null
# updated_at :datetime not null
# creator_id :integer
# updater_id :integer
#

# Provides a select box that stores string values.
Expand Down
2 changes: 0 additions & 2 deletions app/models/alchemy/essence_text.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@
# link_class_name :string
# public :boolean default(FALSE)
# link_target :string
# creator_id :integer
# updater_id :integer
# created_at :datetime not null
# updated_at :datetime not null
#
Expand Down
18 changes: 0 additions & 18 deletions db/migrate/20200226213334_alchemy_four_point_four.rb
Original file line number Diff line number Diff line change
Expand Up @@ -65,17 +65,13 @@ def up
t.boolean "value"
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 ["value"], name: "index_alchemy_essence_booleans_on_value"
end
end

unless table_exists?("alchemy_essence_dates")
create_table "alchemy_essence_dates", force: :cascade do |t|
t.datetime "date"
t.integer "creator_id"
t.integer "updater_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
end
Expand All @@ -86,8 +82,6 @@ def up
t.integer "attachment_id"
t.string "title"
t.string "css_class"
t.integer "creator_id"
t.integer "updater_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.string "link_text"
Expand All @@ -98,8 +92,6 @@ def up
unless table_exists?("alchemy_essence_htmls")
create_table "alchemy_essence_htmls", force: :cascade do |t|
t.text "source"
t.integer "creator_id"
t.integer "updater_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
end
Expand All @@ -113,8 +105,6 @@ def up
t.string "link_class_name"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.integer "creator_id"
t.integer "updater_id"
end
end

Expand All @@ -138,8 +128,6 @@ def up
t.string "link_title"
t.string "css_class"
t.string "link_target"
t.integer "creator_id"
t.integer "updater_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.string "crop_from"
Expand All @@ -154,8 +142,6 @@ def up
t.text "body"
t.text "stripped_body"
t.boolean "public"
t.integer "creator_id"
t.integer "updater_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
end
Expand All @@ -166,8 +152,6 @@ def up
t.string "value"
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 ["value"], name: "index_alchemy_essence_selects_on_value"
end
end
Expand All @@ -180,8 +164,6 @@ def up
t.string "link_class_name"
t.boolean "public", default: false
t.string "link_target"
t.integer "creator_id"
t.integer "updater_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
end
Expand Down
2 changes: 1 addition & 1 deletion lib/alchemy/essence.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def acts_as_essence(options = {})
class_eval <<-RUBY, __FILE__, __LINE__ + 1
attr_writer :validation_errors
include Alchemy::Essence::InstanceMethods
stampable stamper_class_name: Alchemy.user_class_name

validate :validate_ingredient, on: :update, if: -> { validations.any? }

has_one :content, as: :essence, class_name: "Alchemy::Content", inverse_of: :essence
Expand Down
18 changes: 0 additions & 18 deletions spec/dummy/db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -66,15 +66,11 @@
t.boolean "value"
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 ["value"], name: "index_alchemy_essence_booleans_on_value"
end

create_table "alchemy_essence_dates", force: :cascade do |t|
t.datetime "date"
t.integer "creator_id"
t.integer "updater_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
end
Expand All @@ -83,8 +79,6 @@
t.integer "attachment_id"
t.string "title"
t.string "css_class"
t.integer "creator_id"
t.integer "updater_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.string "link_text"
Expand All @@ -93,8 +87,6 @@

create_table "alchemy_essence_htmls", force: :cascade do |t|
t.text "source"
t.integer "creator_id"
t.integer "updater_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
end
Expand All @@ -106,8 +98,6 @@
t.string "link_class_name"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.integer "creator_id"
t.integer "updater_id"
end

create_table "alchemy_essence_nodes", force: :cascade do |t|
Expand All @@ -134,8 +124,6 @@
t.string "link_title"
t.string "css_class"
t.string "link_target"
t.integer "creator_id"
t.integer "updater_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
t.string "crop_from"
Expand All @@ -148,8 +136,6 @@
t.text "body"
t.text "stripped_body"
t.boolean "public"
t.integer "creator_id"
t.integer "updater_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
end
Expand All @@ -158,8 +144,6 @@
t.string "value"
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 ["value"], name: "index_alchemy_essence_selects_on_value"
end

Expand All @@ -170,8 +154,6 @@
t.string "link_class_name"
t.boolean "public", default: false
t.string "link_target"
t.integer "creator_id"
t.integer "updater_id"
t.datetime "created_at", precision: 6, null: false
t.datetime "updated_at", precision: 6, null: false
end
Expand Down