Ruby on Rails Friday, June 23, 2017



On Saturday, June 17, 2017 at 9:32:55 PM UTC-4, Walter Lee Davis wrote:

> On Jun 17, 2017, at 11:31 AM, fugee ohu <fuge...@gmail.com> wrote:
>
> I previously had it working and when you clicked a comment link a new page with a form would load
>
>

If you have the form appearing on a new page now, and the form works and can submit and save a comment, then you can change the link to the comment form to include remote: true. Then create a new.js.erb file in the same views folder as your current new.html.erb file.

Use Gist or another pastbin to show me what your _form.html.erb looks like, and what your index.html.erb (specifically your content_tag_for helper) looks like at the moment. That will determine what we put into the new.js.erb file.

Walter

 I can't figure out what variables from _post.html.erb will be available to _comment.html.erb Also, do I need the index action in the comments_controller.rb and an index view Maybe I need it to chain the two partials together Here they are https://gist.github.com/mices/d9aa8b344c214c4a422ffc8a538eb566

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/54955443-ff5b-42cd-9931-f70ba9c073f3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment