Sha256: e2c71650f83898260fe8d604654bf34db9aeac1aaca53b02540b8bbd6ad61418
Contents?: true
Size: 584 Bytes
Versions: 3
Compression:
Stored size: 584 Bytes
Contents
module ActsAsFavoritor def self.default_scope config = get_config if config&.key :default_scope config[:default_scope] else 'favorite' end end def self.cache config = get_config if config&.key :cache config[:cache] else false end end private def self.get_config require 'yaml' begin YAML.load_file 'config/acts_as_favoritor.yml' rescue Exception end end end
Version data entries
3 entries across 3 versions & 1 rubygems