Hello
I am trying to upload a picture and refrecar layer with
responds_to_parent. I have this form
rhtml
------
<% form_for(photo, :url => {:action => "create", :tID =>
params[:tID] },
:html => { :multipart => true, :target => "uploadFrame",
:id =>
''uploadPhotoForm'' }) do |f| -%>
<tr>
<td>
<div class="fileinputs">
<input id="photo_uploaded_data"
name="photo[uploaded_data]"
type="file" class="file"
size="15"/>
<div class="fakefile">
<input id="etiqueta" size="15"/>
<img src="../images/find.gif" class="imagenbt"/>
</div>
</div>
</td>
</tr>
<tr>
<td class="okLogo" valign="top"
colspan="2">
<%= image_submit_tag ("../images/ok.gif") %>
</td>
</tr>
<% end -%>
<iframe id=''upload_frame'' name="upload_frame"
style="width:1px;height:1px;
border:0px" src="about:blank"></iframe>
controller
-----------
def create
@photo = Photo.new(params[:photo])
if @photo.save
responds_to_parent do
render :update do |page|
if @success
page.form.reset ''uploadPhotoForm''
else
page.alert "Photo upload didn''t work!
Sorry!"
end
end
end
end
end
Error en log
-------------
NoMethodError (undefined method `responds_to_parent'' for
#<PhotosController:0x48b4454>):
I have not copied installed, pq not found to install the
vendor/plugins/responds_to_parent and vendor/plugins/remote_upload
I have included this js
-----------------------
<script type="text/javascript"
src="/javascripts/prototype.js?1194344831">
</script>
<script type="text/javascript"
src="/javascripts/effects.js?1190011601">
</script>
<script type="text/javascript"
src="/javascripts/dragdrop.js?1190011601">
</script>
<script type="text/javascript"
src="/javascripts/controls.js?1190011601">
</script>
<script type="text/javascript"
src="/javascripts/remote_upload.js?1166647576">
</script>
<script type="text/javascript"
src="/javascripts/builder.js?1194344155">
</script>
<script type="text/javascript"
src="/javascripts/application.js?1192474542">
Someone knows this because I do not find the responds_to_parent? ?
Please do not look that over. The project had to deliver yesterday and
not
It functioning ....
Thank you
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
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-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---