提交 7b9964c2 编写于 作者: C Coraline Ada Ehmke + Aaron Patterson 提交者: Aaron Patterson

small refactoring

上级 1606fc9d
......@@ -135,17 +135,13 @@ def polymorphic_url(record_or_hash_or_array, options = {})
record = record_list.pop
inflection = nil
inflection = :singular
should_pop = true
if record.try(:persisted?)
should_pop = false
inflection = :singular
elsif options[:action] == 'new'
should_pop = true
inflection = :singular
else
should_pop = true
inflection = :plural
end
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册