lib/plutonium/core/fields/inputs/base.rb in plutonium-0.6.2 vs lib/plutonium/core/fields/inputs/base.rb in plutonium-0.8.0
- old
+ new
@@ -8,11 +8,11 @@
def initialize(name, **user_options)
@name = name
@user_options = user_options
end
- def render(f, record)
+ def render(f, record, **)
raise NotImplementedError, "#{self.class}#render"
end
def collect(params)
# Handles multi parameter attributes
@@ -24,11 +24,11 @@
# - parameter(1)
# - parameter(2)
# - parameter(1i)
# - parameter(2f)
regex = /^#{param}(\(\d+[if]?\))?$/
-
- params.select { |key| regex.match? key }
+ keys = params.select { |key, value| regex.match?(key) }.keys
+ params.slice(*keys)
end
protected
def input_options = {}