Skip to content

fix: inline EventHelper concern into Event model#2705

Open
mroderick wants to merge 1 commit into
masterfrom
inline-event-helper
Open

fix: inline EventHelper concern into Event model#2705
mroderick wants to merge 1 commit into
masterfrom
inline-event-helper

Conversation

@mroderick

@mroderick mroderick commented Jul 15, 2026

Copy link
Copy Markdown
Collaborator

What

Inline the EventHelper concern into the Event model. EventHelper was only included by Event, making it a code-slicing (single-model) concern.

Why

Single-model concerns add indirection without sharing. The same pattern was previously applied to Permissions (inlined into Member). Keeping validation logic directly in the model is simpler and more discoverable.

Changes

  • Move 5 validation methods from app/models/concerns/event_helper.rb into app/models/event.rb (private section, alongside existing duplicated_sponsors)
  • Remove include EventHelper from Event
  • Delete app/models/concerns/event_helper.rb

Testing

spec/models/event_spec.rb — 34 examples, 0 failures

EventHelper was a single-model concern (only used by Event). Inline its
validation methods directly into Event and remove the concern file to
eliminate unnecessary indirection.

This follows the precedent set by inlining Permissions into Member.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants