lib/telegram/bot/railtie.rb in telegram-bot-0.3.0 vs lib/telegram/bot/railtie.rb in telegram-bot-0.4.0
- old
+ new
@@ -1,9 +1,9 @@
require 'telegram/bot/routes_helper'
module Telegram
- class Bot
+ module Bot
class Railtie < Rails::Railtie
config.telegram_updates_controller = ActiveSupport::OrderedOptions.new
rake_tasks do
load 'tasks/telegram-bot.rake'
@@ -16,9 +16,10 @@
initializer 'telegram.bot.updates_controller.set_config' do |app|
options = app.config.telegram_updates_controller
ActiveSupport.on_load('telegram.bot.updates_controller') do
self.logger = options.logger || Rails.logger
+ self.session_store = options.session_store || Rails.cache
end
end
initializer 'telegram.bot.updates_controller.add_ar_runtime' do
ActiveSupport.on_load('telegram.bot.updates_controller') do