Have you tried debugging the page with Firebug? It almost sounds to
me like you would want to take a look a the network calls and make
sure you are getting all of the JS files.
ops! i figured it out!
when i saw on firebug that i was getting no js calls
i went to look at my javascript_include_tag, i just saw that i missed
the ‘=’ on the <%=
… beginners mistake… sorry…
and thanks for the help about how to submit the form!
Are you sending the form back in the ajax request? I think this might be
what you’re doing, because you’re updating the div post_wall (which is
inside the form) which will keep putting the form back in there.
Hi, another thing, now my page looks like the following:
But, i don’t know why, the form_remote_for block, is being duplicated
everytime i click on submit_tag, and the post_wall div isn’t being
updated =/
there is form_remote_for just like mine on the Rails Way book… so i
don’t know why it doesn’t get updated! and duplicates teh post for…
I’m doing this in my action:
def create @user = User.find_by_name(params[:name]) @user.posts << Post.new(params[:post])
respond_to do |format|
if (@user.save)
flash[:notice] = "Post criado com sucesso"
format.html { render :action => 'show' }
else
format.html
end
end
end
I believe you’re correct, i’m sending the form back on the div, have any
idea of what i could do? i’m kinda lost now…
Ryan B. wrote:
Are you sending the form back in the ajax request? I think this might be
what you’re doing, because you’re updating the div post_wall (which is
inside the form) which will keep putting the form back in there.