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

Changed name dinsdag kring and remove woensdag kring #438

Open
wants to merge 9 commits into
base: staging
Choose a base branch
from
Open
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: 1 addition & 1 deletion app/models/activity.rb
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ class Activity < ApplicationRecord
after_save :copy_author_and_group_to_form!

def self.categories
%w[algemeen societeit vorming dinsdagkring woensdagkring
%w[algemeen societeit vorming kring
choose ifes ozon disputen kiemgroepen huizen extern eerstejaars curiositates]
end

Expand Down
17 changes: 17 additions & 0 deletions db/migrate/20241113104056_simplyfing_calender_options.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
class SimplyfingCalenderOptions < ActiveRecord::Migration[7.0]
def up
Activity.where(category: 'dinsdagkring').find_each do |activity|
activity.update(category: 'kring')
end

Activity.where(category: 'woensdagkring').find_each do |activity|
activity.update(category: 'kring')
end
end

def down
Activity.where(category: 'kring').find_each do |activity|
activity.update(category: 'dinsdagkring')
end
end
end
5 changes: 2 additions & 3 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@
# migrations use external dependencies or application code.
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2024_11_13_091607) do
ActiveRecord::Schema[7.0].define(version: 2024_11_13_104056) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

Expand Down Expand Up @@ -474,7 +473,7 @@
t.index ["author_id"], name: "index_polls_on_author_id"
t.index ["form_id"], name: "index_polls_on_form_id"
end
3

create_table "room_adverts", force: :cascade do |t|
t.string "house_name", null: false
t.string "contact", null: false
Expand Down
2 changes: 1 addition & 1 deletion spec/factories/activities.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
start_time { Faker::Time.between(from: 1.day.ago, to: Time.zone.today) }
end_time { Faker::Time.between(from: 1.day.from_now, to: 2.days.from_now) }
category do
%w[algemeen societeit vorming dinsdagkring woensdagkring
%w[algemeen societeit vorming kring
choose ifes ozon disputen kiemgroepen huizen extern eerstejaars curiositates].sample
end
publicly_visible { false }
Expand Down
2 changes: 1 addition & 1 deletion spec/models/activity_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@
context 'when it is another category' do
let(:record) do
build_stubbed(:activity,
category: %w[algemeen sociëteit vorming dinsdagkring woensdagkring
category: %w[algemeen sociëteit vorming kring
disputen kiemgroepen huizen extern curiositates].sample)
end

Expand Down
Loading