Sunday, May 23, 2010

[Rails] remote_function return No action responded error

here i given my codes when i execute this remote_function rails give
me this error

ActionController::UnknownAction (No action responded to report_poem.
Actions: create, destroy, edit, index, new, show, update):

in my view

<span class="report_button" onclick="<
%=remote_function(:url=>{:action=>:report_poem,:id=>@poem.id})
%>">Submit</span>

in my controller

def report_poem
@poem = Poem.find(params[:id])
respond_to do |format|
format.js
end
end

so anybody know what is the reason is?

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate