如何将PusherClient设置为Rails初始化程序?

时间:2011-12-26 10:49:24

标签: ruby-on-rails ruby-on-rails-3 initializer

https://github.com/logankoester/pusher-client如何将设置放入config/initializers/中的rails初始值设定项?

1 个答案:

答案 0 :(得分:3)

pusher.rb中创建一个名为config/initialisers的文件,并在其中添加您的推送配置,例如:

Pusher.app_id = 'your-pusher-app-id'
Pusher.key = 'your-pusher-key'
Pusher.secret = 'your-pusher-secret'

宝石的完整文档可以在这里找到:http://rubydoc.info/github/pusher/pusher-gem/master/frames