Skip to content

Commit 7c30022

Browse files
committed
Fix poller rake task for Rails 8.0
1 parent 814c4e7 commit 7c30022

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Unreleased
22

3+
# 0.16.6
4+
5+
- Fix poller rake task for Rails 8.0
6+
37
# 0.16.5
48

59
- Rails 8.0 support

lib/tasks/telegram-bot.rake

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ namespace :telegram do
1515
Rails.logger.extend ActiveSupport::Logger.broadcast console
1616
end
1717
end
18+
# Routes are not loaded by default in Rails >= 8.0.
19+
# Load them explicitly to identify a controller for a bot.
20+
Rails.application.try(:reload_routes_unless_loaded)
1821
Telegram::Bot::UpdatesPoller.start(ENV['BOT']&.to_sym || :default)
1922
end
2023

lib/telegram/bot/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module Telegram
44
module Bot
5-
VERSION = '0.16.5'
5+
VERSION = '0.16.6'
66

77
def self.gem_version
88
Gem::Version.new VERSION

0 commit comments

Comments
 (0)