提交 08a08d97 编写于 作者: N Neeraj Singh 提交者: Aaron Patterson

no need to check for nil?

上级 692f5184
......@@ -1015,7 +1015,7 @@ def value_before_type_cast(object)
module ClassMethods
def value(object, method_name)
object.send method_name unless object.nil?
object.send method_name if object
end
def value_before_type_cast(object, method_name)
......@@ -1055,7 +1055,7 @@ def radio_button_checked?(value, checked_value)
private
def add_default_name_and_id_for_value(tag_value, options)
unless tag_value.nil?
if tag_value
pretty_tag_value = tag_value.to_s.gsub(/\s/, "_").gsub(/[^-\w]/, "").downcase
specified_id = options["id"]
add_default_name_and_id(options)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册