lib/telegram/bot/updates_controller.rb in telegram-bot-0.7.4 vs lib/telegram/bot/updates_controller.rb in telegram-bot-0.8.0
- old
+ new
@@ -19,19 +19,19 @@
# # ...
# end
# end
#
# def help(*)
- # reply_with :message, text:
+ # respond_with :message, text:
# end
#
# To process plain text messages (without commands) or other updates just
# define public method with name of payload type. They will receive payload
# as an argument.
#
# def message(message)
- # reply_with :message, text: "Echo: #{message['text']}"
+ # respond_with :message, text: "Echo: #{message['text']}"
# end
#
# def inline_query(query)
# answer_inline_query results_for_query(query), is_personal: true
# end
@@ -61,10 +61,10 @@
autoload :MessageContext, 'telegram/bot/updates_controller/message_context'
autoload :Botan, 'telegram/bot/updates_controller/botan'
include AbstractController::Callbacks
# Redefine callbacks with default terminator.
- if ActiveSupport.gem_version >= Gem::Version.new('5')
+ if ActiveSupport::VERSION::MAJOR >= 5
define_callbacks :process_action,
skip_after_callbacks_if_terminated: true
else
define_callbacks :process_action,
terminator: ->(_, result) { result == false },