I have tested your code and I don't get two posts, I only get one as
expected :S.
Can you try some variations of the show.dryml?
Variation 1
-----------
<show-page>
<collection: replace>
<collection:comments part="comments"/>
<form:comments.new update="comments">
<field-list: skip="issue"/>
</form>
</collection:>
</show-page>
Variation 2
-----------
<show-page>
<collection: replace>
<collection:comments part="comments"/>
</collection:>
<form: update="comments"/>
</show-page>
And add this to comments_controller.rb:
auto_actions_for :issue, :create
Take into account that my parent model is called "issue".
I think your problem might be related to JS loading twice. About
debugging JS, make sure you have this in config/development.rb:
# Do not compress assets
config.assets.compress = false
# Expands the lines which load the assets
config.assets.debug = true
And also make sure that you removed the JS in public/assets (that's only
needed in production environment). Do it with:
rake assets:clean
If you don't find the solution, tell us and we'll investigate a bit more :)
Regards,
Ignacio
El 18/06/13 00:02, matthew berardi escribió:
> Hello,
> I'm new to hobo. I have added an ajax form for a child to show.dryml
> with the following:
>
> <show-page>
> <collection: replace>
> <collection:comments part="comments"/>
>
> <form:comments.new update="comments">
> <div>
> Add a comment:
> <input:comment/>
> </div>
> </form>
> </collection:>
>
> </show-page>
>
> Whenever I hit enter in the comment box a get two posts. I've also tried
> using the rapid generated form's submit button and I also get double posts.
> If anyone has any ideas I'd really appreciate it. Or, if anyone has any
> tips on how to try to debug the js I'm all ears.
> If I could figure out how to get front.js generated in a human-readable
> form I might be able to figure out.
>
> Thanks a lot,
> Matt
>
> --
> You received this message because you are subscribed to the Google
> Groups "Hobo Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/hobousers.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>
--
Ignacio Huerta Arteche
http://www.ihuerta.net
Teléfono: 0034 645 70 77 35
Email realizado con software libre
--
You received this message because you are subscribed to the Google Groups "Hobo
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/groups/opt_out.