Skip to content

Conversation

@italomatos
Copy link
Contributor

@italomatos italomatos commented Dec 11, 2025

Replace SQL string syntax with Rails range syntax for date filtering in the ActivitySpike::Detector. This improves code readability and follows Rails idioms.

Changed from:

 .where("created_at >= ?", recent_period.seconds.ago)

To:

  .where(created_at: recent_period.seconds.ago..)

This modernizes the codebase while maintaining the same functionality.

Replace SQL string syntax with Rails range syntax for date filtering
in the ActivitySpike::Detector. This improves code readability and
follows Rails idioms.

Changed from:
  .where("created_at >= ?", recent_period.seconds.ago)

To:
  .where(created_at: recent_period.seconds.ago..)

This modernizes the codebase while maintaining the same functionality.
@jeremy jeremy merged commit 2e33262 into basecamp:main Dec 12, 2025
4 checks passed
olivaresf added a commit that referenced this pull request Dec 12, 2025
* origin/main: (67 commits)
  Wrap join code redemption in a lock
  Remove redundant include
  Replace custom code generator with Base32
  Test that you can't go to the magic link screen without an email
  Bundle drift detection and correction (#2101)
  Refactor: Use Rails range syntax in ActivitySpike query (#2080)
  Fix indentation in multi_db.rb initializer (#2082)
  Fix typo in translate property in card columns CSS (#2090)
  Refactor: use idiomatic .last instead of .order(:desc).first (#2098)
  bin/bundle-both (#2100)
  API: Allow updates to `last_active_at` (#2076)
  Move email address into hint line
  Bump fizzy-saas to pickup another staging change.
  Remove the rails credentials from .gitattributes
  Fix typo: minues → minutes
  Fix duplicate word: use use → use
  Add QrCodesController test
  Fix typo in _entropy.html.erb
  Show the email address you are signing in with
  Prohibit access to magic links unless an email address
  ...

# Conflicts:
#	app/controllers/sessions/magic_links_controller.rb
#	app/controllers/sessions_controller.rb
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