Sha256: 307f6eca9b49bb90ea1d1b301af1365e6119643dd0c0e9797254d0bb59dd41f4
Contents?: true
Size: 575 Bytes
Versions: 12
Compression:
Stored size: 575 Bytes
Contents
module SimpleForm module Wrappers class Leaf attr_reader :namespace def initialize(namespace, options = {}) @namespace = namespace @options = options end def render(input) method = input.method(@namespace) if method.arity == 0 ActiveSupport::Deprecation.warn(SimpleForm::CUSTOM_INPUT_DEPRECATION_WARN % { name: @namespace }) method.call else method.call(@options) end end def find(name) self if @namespace == name end end end end
Version data entries
12 entries across 12 versions & 3 rubygems