You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Feb 5, 2021. It is now read-only.
An Duong edited this page Dec 27, 2013
·
1 revision
Since the README has the old rjs option using page.replace_html..., it just doesn't work with Rails 3 and jQuery. So the following makes it work. It will work with Rails 4 too.
rate action
def rate
@video = Video.find(params[:id])
@video.rate(params[:stars], current_user, params[:dimension])
respond_to do |format|
format.js
end
end
rate.js.erb (put this file in Views folder of controller#action. For example: views/videos/rate.js.erb)