# Ruby - Rails - Tracing Call to Know Multiple Trigger-call class Model before_update :show_changed_fields def show_changed_fields p '~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~' p Model.columns.map(&:name).select{|v|self.send("#{v}_changed?".to_sym) } p caller.select{|x|/\/app\//=~x}.collect{|x|x.split('/')[-1]} end end
One Comment
Sort by SongnFirst Song: (This Is) The Dream of Evan and Chan – Ben GibbardnLast Song: u9f99u5973u4e4bu58f0 – Some chinese instrumental, I have no idea by who Click http://link.mx/hool08200