Question
How to call a rails method from in jQuery
I have this JQuery code:
$("p.exclamation, div#notification_box").live("mouseover", function() {
});
and I want to call this rails method from inside the jQuery code as a callback:
def render_read
self.user_notifications.where(:read => false).each do |n|
n.read = true
n.save
end
end
This method is in my user model. Is there any way to do this?
21 27570
21