# \[Error\] responds\_to\_parent not respond rjs action

**URL:** <https://www.ruby-forum.com/t/error-responds-to-parent-not-respond-rjs-action/226014>\
**Category:** Rails\
**Created:** [July 15, 2008, 4:32am UTC](https://www.ruby-forum.com/t/error-responds-to-parent-not-respond-rjs-action/226014 "2008-07-15T04:32:30Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [July 15, 2008, 4:32am UTC](https://www.ruby-forum.com/t/error-responds-to-parent-not-respond-rjs-action/226014/1 "2008-07-15T04:32:30Z")

</div>

Hi,  
(first of all, I have English as second language. I’m sorry for any  
mistake.)

So, I’m getting used to RoR but there are quite things that I can’t do.

I’m having a problem whit responds\_to\_parent. All the action works ok,  
data goes to the db, but the screen don’t change.

Codes:

controller  
/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*  
def create  
if param\_posted?(:attachment)  
if params[:employee] and params[:address]  
@attachment = Attachment.new(params[:attachment])  
@address = Address.new(params[:address])  
@employee = Employee.new(params[:employee])  
if @attachment.save  
if @address.save  
@employee.address\_id = @address.id  
@employee.attachment\_id = @attachment.id  
if @employee.save  
#@employee.login!(session) !@#$%^&_&^%$#@!@#$%^&_&^%$# o que  
Ã© isso… mudar!  
flash[:notice] = “Empregado cadastrado”  
responds\_to\_parent do  
render :update do |page|  
page[:history\_area].replace  
show\_histories(@employee.id,ApplicationHelper::Employee\_type)  
page[:show\_area].replace :partial =\>  
“/employee/show\_area”, :object =\> @employee  
if session[:employee\_list\_style] == “list”  
page[:employee\_list\_area].replace :partial =\>  
“/employee/employee\_list”  
else  
page[:employee\_list\_area].replace :partial =\>  
“/employee/employee\_list\_block”  
end  
end  
end  
end  
end  
end  
end  
@employee.clear\_password!  
end  
end  
\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/

view  
/\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*

# Employee#register
 \<%= error\_messages\_for "attachment\_meta", "employee", "address" %\>

```
<% form_for :attachment, :url => {:controller => 'employee', :action

```

=\> ‘create’}, :html =\> { :multipart =\> true, :target =\> ‘upload\_frame’}  
do |form\_attachment| -%\>  
\<%# form\_for :attachment, :url =\> {:action =\> ‘create’}, :html =\> {  
:multipart =\> true } do |form\_attachment| -%\>

  
photo   
\<%= form\_attachment.file\_field :uploaded\_data %\>  

```
  <%#Render _employee_form.rhtm. -%>
  <%= render (:partial => "employee_form") %>

  <%#Render _address.rhtm. -%>
  <%= render (:partial => "/common/address") %>

  <%= submit_tag "Cadastrar", :class => "submit" %>
</filedset>

```

\<% end -%\>

\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*\*/

Also I changed the name of the plugin folder, form svn to  
responds\_to\_parent.

The code may look strange or not too good… heheeh I’m knew on this…  
any help I will be thankful.

Best regards.

MrSousa

---

<div class="post-metadata">

**Author:** ![davidstokar](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/4da419/32.png) [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Post date:** [July 17, 2008, 6:23am UTC](https://www.ruby-forum.com/t/error-responds-to-parent-not-respond-rjs-action/226014/2 "2008-07-17T06:23:49Z")

</div>

up.

Someone could help here?

Tks.
