Sha256: b8f0ae857432739b1016c43442462c68437b4676120a5055762ced905fe02141
Contents?: true
Size: 497 Bytes
Versions: 26
Compression:
Stored size: 497 Bytes
Contents
require 'activeresource' module EgovUtils class Love < ::ActiveResource::Base def self.config file = Rails.root.join('config', 'config.yml') File.exists?(file) ? YAML.load_file(file) : {} end self.site = "#{config['love_url'] || Rails.configuration.try(:love_url)}/api/v1/" def self.where(clauses = {}) raise ArgumentError, "expected a clauses Hash, got #{clauses.inspect}" unless clauses.is_a? Hash find(:all, params: {f: clauses}) end end end
Version data entries
26 entries across 26 versions & 1 rubygems