Displaying 1 result from an estimated 1 matches for "ratingscontrol".
2006 Dec 11
1
Using link_to_remote to add a record
...ng?
Here is what I have in my view:
<%= link_to_remote( "1", {:url => { :controller => "ratings", :action =>
"rate", :rateable_id => "1", :rating => "1", :rateable_type =>
"article"}}) %>
Here is what I have in RatingsController:
def rate
@rating = Rating.new(:rateable_id => params[:rateable_id],
:rating => params[:rating],
:rateable_type => params[:rateable_type])
end
I found that I can successfully write to the database through the
console with:...