lib/presentation/form.rb in presenting-2.0.1 vs lib/presentation/form.rb in presenting-2.0.2
- old
+ new
@@ -120,13 +120,16 @@
@value ||= name.to_sym
end
attr_writer :value
def value_from(obj) #:nodoc:
- v = case value
- when Symbol: obj.send(value)
- when String: value
- when Proc: value.call(obj)
+ case value
+ when Symbol
+ obj.send(value)
+ when String
+ value
+ when Proc
+ value.call(obj)
end
end
# the widget type for the field. use type_options to pass arguments to the widget.
def type