Skip to content

fix: move EventHelper from app/helpers to app/models/concerns#2702

Open
mroderick wants to merge 1 commit into
masterfrom
feature/move-event-helper-to-concern
Open

fix: move EventHelper from app/helpers to app/models/concerns#2702
mroderick wants to merge 1 commit into
masterfrom
feature/move-event-helper-to-concern

Conversation

@mroderick

@mroderick mroderick commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

Problem

EventHelper lived in app/helpers/ (Presentation layer per Rails conventions) but is included in the Event model (Domain layer). It defines model validation methods (sponsors_uniqueness, venue_or_remote_must_be_present, etc.) operating on model state — a presentation-to-domain layer violation.

Solution

Move EventHelper from app/helpers/event_helper.rb to app/models/concerns/event_helper.rb. The include EventHelper in app/models/event.rb is unchanged — Rails autoloading resolves the module from app/models/concerns/ under the same name.

Verification

  • 1106 spec examples, 0 failures
  • Pure file move (no code changes)

EventHelper contains model validation logic (venue_or_remote_must_be_present,
sponsors_uniqueness, etc.) operating on model state, making it a concern
rather than a view helper. Moving it to app/models/concerns/ fixes a
presentation-to-domain layer violation.

The include EventHelper line in Event does not change — Rails autoloading
resolves the module from app/models/concerns/ under the same name.
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.

1 participant