我有这个JQuery代码:
$("p.exclamation, div#notification_box").live("mouseover", function() {
});
我想从jQuery代码内部调用这个rails方法作为回调:
def render_read
self.user_notifications.where(:read => false).each do |n|
n.read = true
n.save
end
end
这个方法在我的用户模型中。有没有办法做到这一点?
https://stackoverflow.com/questions/5933261
复制相似问题