【发布时间】:2010-05-07 14:31:47
【问题描述】:
unless scope.nil?
@page ||= Page.find(id, :scope => Page.find(scope) )
else
@page ||= Page.find(id)
end
【问题讨论】:
-
以后,请将代码缩进四个空格,以便在 Stack Overflow 上显示时实际上看起来像
code。
标签: ruby refactoring