Method: WechatConfig.get_all_configs
- Defined in:
- lib/generators/wechat/templates/app/models/wechat_config.rb
.get_all_configs(environment) ⇒ Object
18 19 20 21 22 |
# File 'lib/generators/wechat/templates/app/models/wechat_config.rb', line 18 def self.get_all_configs(environment) WechatConfig.where(environment: environment, enabled: true).each_with_object({}) do |config, hash| hash[config.account] = config.build_config_hash end end |