module StrongResources
Constants
- VERSION
Public Class Methods
config()
click to toggle source
# File lib/strong_resources.rb, line 45 def self.config @config ||= Configuration.new end
configure(&blk)
click to toggle source
# File lib/strong_resources.rb, line 41 def self.configure(&blk) config.instance_eval(&blk) end
find(name)
click to toggle source
# File lib/strong_resources.rb, line 49 def self.find(name) found = config.strong_resources[name] raise UnregisteredResource.new(name) unless found found end
type_for_param(name)
click to toggle source
# File lib/strong_resources.rb, line 55 def self.type_for_param(name) found = config.strong_params[name] raise UnregisteredType.new(name) unless found found[:type] end