Homeland 怎么判断是否更新

sdfsd · October 27, 2020 · 219 hits

在 homeland 我发现一个函数 def indexed_changed? saved_change_to_title? || saved_change_to_body? end

该函数用来判断是否修改字段 那要是说 判断只修改某两个字段不更新 其他字段修改了就要更新 那应该怎么写
if only_change_culumns(xx,xxx,xxx,xxx) pass else orther_change_culumns(xx,xxx,xxx,xxx) update

No Reply at the moment.
You need to Sign in before reply, if you don't have an account, please Sign up first.