summaryrefslogtreecommitdiff
path: root/db/seeds
AgeCommit message (Collapse)Author
8 daysReplace awesome_nested_set with a plain parent_id-based NestedTree concernerdgeist
Root-caused this session: appending a child to any node never widened that parent's own rgt boundary, on the pinned revision (Gemfile tracked main directly, chasing a too-conservative gemspec constraint - not, as first assumed, a deliberate pin to avoid a known bug). Reproduced cleanly on a single ordinary create with no concurrency and no bulk operation involved, confirmed via the gem's own SetValidator, then confirmed as the root cause of nodes_controller_test.rb's 3 long-standing "pre-existing" failures - not three separate mysteries, one bug. admin_controller's sitemap needed its own real conversion, not just a drop-in: awesome_nested_set's lft column implicitly provided correct depth-first tree order for free, which the old code combined with a separate class-level each_with_level iterator. Both replaced by one method, self_and_descendants_ordered_with_level, computing an ordered [node, level] list in a single query-then-walk pass - checked against the actual view template first (admin/index.html.erb) rather than assumed, since it relies on list order alone to render correct visual nesting. lft/rgt/depth columns intentionally left in schema, unused - dropping them is a separate, deliberately deferred migration once this is proven running for a while, not bundled with the behavior change.
12 daysCorrect chapters seed against live ccc.de pageserdgeist
12 daysascade-destroy occurrences; support events without a fixed start timeerdgeist
- Event#occurrences is now dependent: :destroy, so destroying an Event (directly, or via Node's cascade) removes its Occurrence rows instead of orphaning them. - Renamed generate_occurences -> generate_occurrences (typo fix); callback and method updated together. - Occurrence.generate returns early when event.start_time is nil, so a chapter with no sourced time produces zero occurrences instead of a guessed one. - seed_chapter no longer falls back to 19:00 when start_time is absent; base_time/end_time are nil in that case. Database-level foreign key cascade on occurrences.event_id is still pending.
13 daysRemove review notes fileerdgeist
13 daysRewrite chapter seeds: multi-event support, drop is_primary, fix dataerdgeist
- seed_chapter now accepts events: array instead of flat rrule:/ start_time: params; each event hash supports rrule:, start_time:, tag_list:, location:, duration_hours: - Chapters with multiple open days now represented correctly (Stralsund: Thursday Chaostreff + 2nd/4th Saturday OpenSpace; Hamburg: 2nd Friday + last Tuesday; Stuttgart: 1st Tuesday + 3rd Wednesday; Freiburg: Mon+Tue open + biweekly Plenum; Backnang: 3rd Sunday + 1st Tuesday; Tübingen: last Sunday + 2nd Monday at different venues) - is_primary removed from migration entirely — replaced by tag_list: 'open-day' on events - Stale EN descriptions corrected: Berlin, Darmstadt, Erlangen, Essen, Freiburg, Göttingen, Hamburg, Hannover, Karlsruhe, Paderborn, Stuttgart, Ulm - chaostreff-stralsund duplicate entry removed (Port39 is erfa only)
14 daysAdd chapter_detail template with events and external URL renderingerdgeist
New public page template for erfa and chaostreff nodes. Renders the node's external_url and lists associated events below the page content. Seed script updated to set template_name: 'chapter_detail' on all chapter drafts so the template is applied on publish.
14 daysPhase 2: chapter nodes, aggregate partial, fixeserdgeist
- _chapter.html.erb: new partial for erfa/chaostreff aggregated lists; renders title, location, external_url, sanitized body - content_helper: fix aggregate attr regex to allow hyphens in values (erfa-detail tag was silently dropped); add debug logging (remove) - page.rb: suppress libxml stderr noise in rewrite_links_in_body - db/seeds/chapters.rb: one-shot seed script for erfa and chaostreff chapter nodes under parent nodes 548/549; creates bilingual pages, external_url, primary events with RRULEs where known Note: run Node.rebuild!(false) after execution to fix lft/rgt values
14 daysPhase 1: standalone events, external_url on nodeserdgeist
- Migration: node_id nullable on events and occurrences, add title/description/is_primary to events, external_url to nodes - Existing events marked is_primary: true (were all 1:1 with nodes) - Node: has_one :event -> has_many :events - Event: belongs_to :node optional, validates title presence for standalone events, is_primary uniqueness scoped to node_id, display_title helper falling back through node title - Occurrence: belongs_to :node optional, summary falls back to event.display_title - nodes_helper: event_information uses events.first (interim; will be replaced in Phase 3 event UI) - Tests: fix node.event -> node.events.first in event_test